diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-11-20 20:01:13 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-11-20 20:01:13 +0000 |
commit | 7ff6115b8b913d848b8fe76daf72ca0b4bbf2548 (patch) | |
tree | 35545452de162753f8c608a400f2b0bd97d42807 /cpukit/score/src/heap.c | |
parent | 2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-7ff6115b8b913d848b8fe76daf72ca0b4bbf2548.tar.bz2 |
2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/include/rtems/score/heap.h,
score/include/rtems/score/protectedheap.h,
score/include/rtems/score/wkspace.h, score/src/heap.c,
score/src/heapallocate.c, score/src/heapallocatealigned.c,
score/src/heapextend.c, score/src/heapresizeblock.c,
score/src/heapsizeofuserarea.c, score/src/pheapgetblocksize.c,
score/src/wkspace.c: Revert use of ssize_t. This type is not
guaranteed to be able to represent a positive number greater than the
size of a single allocatable object. We needed a type that is able to
represent the size of a pool of multiple allocatable objects or
potentially nearly all memory.
Diffstat (limited to 'cpukit/score/src/heap.c')
-rw-r--r-- | cpukit/score/src/heap.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cpukit/score/src/heap.c b/cpukit/score/src/heap.c index 8c55b06ecd..042dc6d604 100644 --- a/cpukit/score/src/heap.c +++ b/cpukit/score/src/heap.c @@ -111,10 +111,11 @@ static uint32_t instance = 0; * +--------------------------------+ <- end = begin + size * */ + uint32_t _Heap_Initialize( Heap_Control *the_heap, void *starting_address, - ssize_t size, + size_t size, uint32_t page_size ) { @@ -206,10 +207,10 @@ uint32_t _Heap_Initialize( * Convert user requested 'size' of memory block to the block size. * Return block size on success, 0 if overflow occured */ -ssize_t _Heap_Calc_block_size( - ssize_t size, - uint32_t page_size, - uint32_t min_size) +size_t _Heap_Calc_block_size( + size_t size, + uint32_t page_size, + uint32_t min_size) { uint32_t block_size = size + HEAP_BLOCK_USED_OVERHEAD; _Heap_Align_up(&block_size, page_size); |