From 502629707d8f28e2b1548ebdf03599612d7b6ef5 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 16 May 2012 12:09:56 +0200 Subject: libcsupport: Adjust malloc_walk() prototype The header file provides now also the malloc_walk() prototype. The malloc_walk() prototype reflects now the _Protected_heap_Walk() API. The return status helps to print only in case of an error. --- testsuites/libtests/malloctest/init.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'testsuites/libtests/malloctest/init.c') diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index b81df2c1d9..a93edc41a6 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -34,10 +34,7 @@ #include #include #include - -/* HACK: Blatant visibility violations */ -extern int malloc_info(Heap_Information_block *the_info); -extern void malloc_walk(size_t source, size_t printf_enabled); +#include /* * A simple test of realloc @@ -47,6 +44,7 @@ static void test_realloc(void) void *p1, *p2, *p3, *p4; size_t i; int sc; + bool malloc_walk_ok; /* Test growing reallocation "in place" */ p1 = malloc(1); @@ -103,11 +101,13 @@ static void test_realloc(void) * Walk the C Program Heap */ puts( "malloc_walk - normal path" ); - malloc_walk( 1234, 0 ); + malloc_walk_ok = malloc_walk( 1234, false ); + rtems_test_assert( malloc_walk_ok ); puts( "malloc_walk - in critical section path" ); _Thread_Disable_dispatch(); - malloc_walk( 1234, 0 ); + malloc_walk_ok = malloc_walk( 1234, false ); + rtems_test_assert( malloc_walk_ok ); _Thread_Enable_dispatch(); /* -- cgit v1.2.3