diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-08-09 10:17:42 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-10-25 14:54:06 +0200 |
commit | 6ccfe722bda09ab469d4a9cb2d78666f16955607 (patch) | |
tree | 9a66773bb58ec4220460012d265ce4b7304c0d8f /cpukit/rtems/src/regionextend.c | |
parent | libcsupport: malloc_deferred_frees_initialize() (diff) | |
download | rtems-6ccfe722bda09ab469d4a9cb2d78666f16955607.tar.bz2 |
score: Change _Heap_Extend() API
The _Heap_Extend() has now the same signature as _Heap_Initialize().
The 4th parameter is ignored (page size in _Heap_Initialize()).
Add Heap_Area and Heap_Initialization_or_extend_handler.
Add and test _Heap_No_extend().
This helps to do a table based heap initialization and extension.
Create a table of Heap_Area elements and iterate through it. Set the
handler to _Heap_Initialize() in the first iteration and then to
_Heap_Extend().
Diffstat (limited to 'cpukit/rtems/src/regionextend.c')
-rw-r--r-- | cpukit/rtems/src/regionextend.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/rtems/src/regionextend.c b/cpukit/rtems/src/regionextend.c index cf4489ef0f..205534b246 100644 --- a/cpukit/rtems/src/regionextend.c +++ b/cpukit/rtems/src/regionextend.c @@ -46,7 +46,6 @@ rtems_status_code rtems_region_extend( ) { uintptr_t amount_extended; - bool extend_ok; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; @@ -61,14 +60,14 @@ rtems_status_code rtems_region_extend( case OBJECTS_LOCAL: - extend_ok = _Heap_Extend( + amount_extended = _Heap_Extend( &the_region->Memory, starting_address, length, - &amount_extended + 0 ); - if ( extend_ok ) { + if ( amount_extended > 0 ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; |