From 8ebc680009219120b081a1fcad98e72af48db50e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 24 Jun 2013 13:44:51 +0200 Subject: sptests/spmountmgr01: Simplify This avoids problems with debugging enabled. --- testsuites/sptests/spmountmgr01/init.c | 8 ++++---- 1 file 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 #include #include +#include /* 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 ); -- cgit v1.2.3