diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-24 13:44:51 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-25 17:06:24 +0200 |
commit | 8ebc680009219120b081a1fcad98e72af48db50e (patch) | |
tree | fc892b2f48c074f8495137ca0afc10563ce4ff94 | |
parent | sptests/sp64: Simplify (diff) | |
download | rtems-8ebc680009219120b081a1fcad98e72af48db50e.tar.bz2 |
sptests/spmountmgr01: Simplify
This avoids problems with debugging enabled.
-rw-r--r-- | testsuites/sptests/spmountmgr01/init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuites/sptests/spmountmgr01/init.c b/testsuites/sptests/spmountmgr01/init.c index 01308a58a3..89ba3a674a 100644 --- a/testsuites/sptests/spmountmgr01/init.c +++ b/testsuites/sptests/spmountmgr01/init.c @@ -16,6 +16,7 @@ #include <errno.h> #include <rtems/libio_.h> #include <rtems/libcsupport.h> +#include <rtems/malloc.h> /* forward declarations to avoid warnings */ rtems_task Init(rtems_task_argument argument); @@ -37,13 +38,12 @@ rtems_task Init( ) { int status = 0; - void *alloc_ptr = (void *)0; + void *greedy; puts( "\n\n*** TEST MOUNT MANAGER ROUTINE - 01 ***" ); puts( "Init - allocating most of heap -- OK" ); - alloc_ptr = malloc( malloc_free_space() - 4 ); - rtems_test_assert( alloc_ptr != NULL ); + greedy = rtems_heap_greedy_allocate( NULL, 0 ); puts( "Init - attempt to register filesystem fs - expect ENOMEM" ); status = rtems_filesystem_register( "fs", fs_mount ); @@ -51,7 +51,7 @@ rtems_task Init( rtems_test_assert( errno == ENOMEM ); puts( "Init - freeing allocated memory -- OK" ); - free( alloc_ptr ); + rtems_heap_greedy_free( greedy ); puts( "Init - register filesystem fs -- OK" ); status = rtems_filesystem_register( "fs", fs_mount ); |