Changeset 3861130 in rtems


Ignore:
Timestamp:
Sep 18, 1996, 8:50:27 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
56e0b88
Parents:
4944b5bf
Message:

uses address object rather than direct pointer arithmetic

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/src/heap.c

    r4944b5bf r3861130  
    150150  } else {                                              /* cases 4 and 5 */
    151151
    152     the_block  = (Heap_Block *) (starting_address - HEAP_OVERHEAD);
     152    the_block = (Heap_Block *)
     153       _Addresses_Subtract_offset( starting_address, HEAP_OVERHEAD );
    153154    if ( the_block != the_heap->final )
    154155      return HEAP_EXTEND_NOT_IMPLEMENTED;                   /* case 5 */
     
    259260 
    260261  offset = the_heap->page_size - (((unsigned32) ptr) & (the_heap->page_size - 1));
    261   ptr += offset;
     262  ptr = _Addresses_Add_offset( ptr, offset );
    262263  *(((unsigned32 *) ptr) - 1) = offset;
    263264
  • cpukit/score/src/heap.c

    r4944b5bf r3861130  
    150150  } else {                                              /* cases 4 and 5 */
    151151
    152     the_block  = (Heap_Block *) (starting_address - HEAP_OVERHEAD);
     152    the_block = (Heap_Block *)
     153       _Addresses_Subtract_offset( starting_address, HEAP_OVERHEAD );
    153154    if ( the_block != the_heap->final )
    154155      return HEAP_EXTEND_NOT_IMPLEMENTED;                   /* case 5 */
     
    259260 
    260261  offset = the_heap->page_size - (((unsigned32) ptr) & (the_heap->page_size - 1));
    261   ptr += offset;
     262  ptr = _Addresses_Add_offset( ptr, offset );
    262263  *(((unsigned32 *) ptr) - 1) = offset;
    263264
Note: See TracChangeset for help on using the changeset viewer.