diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-09-18 20:50:27 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-09-18 20:50:27 +0000 |
commit | 3861130b35182824e56c064b840a141eb34ffe84 (patch) | |
tree | f7542819b2d5295e204df02a154f5d3bd8b36424 /c/src/exec/score | |
parent | OBJECTS_NAME_ALIGNMENT definition changed to use sizeof rather than (diff) | |
download | rtems-3861130b35182824e56c064b840a141eb34ffe84.tar.bz2 |
uses address object rather than direct pointer arithmetic
Diffstat (limited to 'c/src/exec/score')
-rw-r--r-- | c/src/exec/score/src/heap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/c/src/exec/score/src/heap.c b/c/src/exec/score/src/heap.c index 11d8a31cee..5c9d9daf1b 100644 --- a/c/src/exec/score/src/heap.c +++ b/c/src/exec/score/src/heap.c @@ -149,7 +149,8 @@ Heap_Extend_status _Heap_Extend( } else { /* cases 4 and 5 */ - the_block = (Heap_Block *) (starting_address - HEAP_OVERHEAD); + the_block = (Heap_Block *) + _Addresses_Subtract_offset( starting_address, HEAP_OVERHEAD ); if ( the_block != the_heap->final ) return HEAP_EXTEND_NOT_IMPLEMENTED; /* case 5 */ } @@ -258,7 +259,7 @@ void *_Heap_Allocate( */ offset = the_heap->page_size - (((unsigned32) ptr) & (the_heap->page_size - 1)); - ptr += offset; + ptr = _Addresses_Add_offset( ptr, offset ); *(((unsigned32 *) ptr) - 1) = offset; #ifdef RTEMS_DEBUG |