Changeset 285


Ignore:
Timestamp:
Dec 16, 2002, 11:15:24 AM (18 years ago)
Author:
orlov
Message:

* empty log message *

Location:
to-imperative/trunk/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/runtime/pxx_heap_allocator.cc

    r147 r285  
    1111  void* const _start,
    1212  size_t const _heap_size,
    13   int _fd = 0,
    14   bool _need_remap = true
     13  int _fd /* = 0 */,
     14  bool _need_remap /* = true */
    1515) :
    1616  heap (_start, _heap_size, page_size, _fd, _need_remap),
  • to-imperative/trunk/runtime/pxx_heap_allocator.hh

    r152 r285  
    184184  {
    185185    MemoryBlock *q = ptr_add( this, offset );
    186     size_t size = q->size;
    187     if( !size )
     186    size_t sz = q->size;
     187    if( sz & (sz - 1) )
     188    {
     189      sz = rounds[((T*)q)->get_order()];
     190      printf( "a(%p):%u ", q, sz );
     191    }
     192    else
     193    {
     194      printf( "f(%p):%u ", q, sz );
     195    }
     196    if( !sz )
    188197    {
    189198      printf( "...block orders are corrupted..." );
    190199      break;
    191200    }
    192     if( size & (size - 1) )
    193     {
    194       size = rounds[((T*)q)->get_order()];
    195       printf( "a(%p):%u ", q, size );
    196     }
    197     else
    198     {
    199       printf( "f(%p):%u ", q, size );
    200     }
    201     offset += size;
     201    offset += sz;
    202202  }
    203203  printf( "\n\n" );
Note: See TracChangeset for help on using the changeset viewer.