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 | |
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')
-rw-r--r-- | cpukit/score/src/heap.c | 11 | ||||
-rw-r--r-- | cpukit/score/src/heapallocate.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/heapallocatealigned.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/heapextend.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/heapresizeblock.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/heapsizeofuserarea.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/pheapgetblocksize.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/wkspace.c | 6 |
8 files changed, 15 insertions, 14 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); diff --git a/cpukit/score/src/heapallocate.c b/cpukit/score/src/heapallocate.c index 6432556fc5..418ee758fc 100644 --- a/cpukit/score/src/heapallocate.c +++ b/cpukit/score/src/heapallocate.c @@ -36,7 +36,7 @@ void *_Heap_Allocate( Heap_Control *the_heap, - ssize_t size + size_t size ) { uint32_t the_size; diff --git a/cpukit/score/src/heapallocatealigned.c b/cpukit/score/src/heapallocatealigned.c index 6ac1425063..3fda404490 100644 --- a/cpukit/score/src/heapallocatealigned.c +++ b/cpukit/score/src/heapallocatealigned.c @@ -131,7 +131,7 @@ Heap_Block *block_allocate( void *_Heap_Allocate_aligned( Heap_Control *the_heap, - ssize_t size, + size_t size, uint32_t alignment ) { diff --git a/cpukit/score/src/heapextend.c b/cpukit/score/src/heapextend.c index 0e0329f4e6..73eb91f127 100644 --- a/cpukit/score/src/heapextend.c +++ b/cpukit/score/src/heapextend.c @@ -38,7 +38,7 @@ Heap_Extend_status _Heap_Extend( Heap_Control *the_heap, void *starting_address, - ssize_t size, + size_t size, uint32_t *amount_extended ) { diff --git a/cpukit/score/src/heapresizeblock.c b/cpukit/score/src/heapresizeblock.c index 760d49bc39..49460f9767 100644 --- a/cpukit/score/src/heapresizeblock.c +++ b/cpukit/score/src/heapresizeblock.c @@ -47,7 +47,7 @@ Heap_Resize_status _Heap_Resize_block( Heap_Control *the_heap, void *starting_address, - ssize_t size, + size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) diff --git a/cpukit/score/src/heapsizeofuserarea.c b/cpukit/score/src/heapsizeofuserarea.c index 136389e878..c1555d2ccc 100644 --- a/cpukit/score/src/heapsizeofuserarea.c +++ b/cpukit/score/src/heapsizeofuserarea.c @@ -42,7 +42,7 @@ bool _Heap_Size_of_user_area( Heap_Control *the_heap, void *starting_address, - ssize_t *size + size_t *size ) { Heap_Block *the_block; diff --git a/cpukit/score/src/pheapgetblocksize.c b/cpukit/score/src/pheapgetblocksize.c index 6baa8f5632..029ef7b2c7 100644 --- a/cpukit/score/src/pheapgetblocksize.c +++ b/cpukit/score/src/pheapgetblocksize.c @@ -19,7 +19,7 @@ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, - ssize_t *size + size_t *size ) { bool status; diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c index 591427cb64..ebb71f3297 100644 --- a/cpukit/score/src/wkspace.c +++ b/cpukit/score/src/wkspace.c @@ -27,7 +27,7 @@ */ void _Workspace_Handler_initialization( void *starting_address, - ssize_t size + size_t size ) { uint32_t memory_available; @@ -61,7 +61,7 @@ void _Workspace_Handler_initialization( * _Workspace_Allocate */ void *_Workspace_Allocate( - ssize_t size + size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); @@ -81,7 +81,7 @@ bool _Workspace_Free( * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( - ssize_t size + size_t size ) { void *memory; |