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 /testsuites | |
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 'testsuites')
-rw-r--r-- | testsuites/libtests/malloctest/init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index a93edc41a6..c2080e8469 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -984,6 +984,12 @@ static void test_heap_extend(void) test_heap_assert( ret, true ); } +static void test_heap_no_extend(void) +{ + uintptr_t extended_space = _Heap_No_extend( NULL, 0, 0, 0 ); + rtems_test_assert( extended_space == 0 ); +} + static void test_heap_info(void) { size_t s1, s2; @@ -1142,6 +1148,7 @@ rtems_task Init( test_realloc(); test_heap_cases_1(); test_heap_extend(); + test_heap_no_extend(); test_heap_info(); test_protected_heap_info(); test_rtems_heap_allocate_aligned_with_boundary(); |