forked from Imagelibrary/rtems
libcsupport: Delete malloc statistics
Use the heap handler statistics instead. Add heap walk option to MALLOC shell command. close #1367
This commit is contained in:
@@ -24,7 +24,7 @@ _SUBDIRS += capture01
|
||||
|
||||
_SUBDIRS += bspcmdline01 cpuuse devfs01 devfs02 devfs03 devfs04 \
|
||||
deviceio01 devnullfatal01 dumpbuf01 gxx01 top\
|
||||
malloctest malloc02 malloc03 malloc04 malloc05 heapwalk \
|
||||
malloctest malloc02 malloc03 malloc04 heapwalk \
|
||||
putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \
|
||||
termios termios01 termios02 termios03 termios04 termios05 \
|
||||
termios06 termios07 termios08 \
|
||||
|
||||
@@ -117,7 +117,6 @@ malloctest/Makefile
|
||||
malloc02/Makefile
|
||||
malloc03/Makefile
|
||||
malloc04/Makefile
|
||||
malloc05/Makefile
|
||||
monitor/Makefile
|
||||
monitor02/Makefile
|
||||
mouse01/Makefile
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
|
||||
rtems_tests_PROGRAMS = malloc05
|
||||
malloc05_SOURCES = init.c
|
||||
|
||||
dist_rtems_tests_DATA = malloc05.scn
|
||||
dist_rtems_tests_DATA += malloc05.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(malloc05_OBJECTS)
|
||||
LINK_LIBS = $(malloc05_LDLIBS)
|
||||
|
||||
malloc05$(EXEEXT): $(malloc05_OBJECTS) $(malloc05_DEPENDENCIES)
|
||||
@rm -f malloc05$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <tmacros.h>
|
||||
#include "test_support.h"
|
||||
#include <rtems/malloc.h>
|
||||
|
||||
const char rtems_test_name[] = "MALLOC 5";
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
int sc;
|
||||
rtems_malloc_statistics_t stats;
|
||||
|
||||
TEST_BEGIN();
|
||||
|
||||
puts( "malloc_get_statistics( NULL ) - returns -1" );
|
||||
sc = malloc_get_statistics( NULL );
|
||||
rtems_test_assert( sc == -1 );
|
||||
|
||||
puts( "malloc_get_statistics( &stats ) - returns -0" );
|
||||
sc = malloc_get_statistics( &stats );
|
||||
rtems_test_assert( sc == 0 );
|
||||
|
||||
TEST_END();
|
||||
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
/* end of file */
|
||||
@@ -1,19 +0,0 @@
|
||||
# COPYRIGHT (c) 1989-2010.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.org/license/LICENSE.
|
||||
#
|
||||
|
||||
This file describes the directives and concepts tested by this test set.
|
||||
|
||||
test set name: malloc05
|
||||
|
||||
directives:
|
||||
|
||||
malloc_get_statistics
|
||||
|
||||
concepts:
|
||||
|
||||
+ Fully exercise malloc_get_statistics.
|
||||
@@ -1,4 +0,0 @@
|
||||
*** TEST MALLOC05 ***
|
||||
malloc_get_statistics( NULL ) - returns -1
|
||||
malloc_get_statistics( &stats ) - returns -0
|
||||
*** END OF TEST MALLOC05 ***
|
||||
@@ -59,7 +59,6 @@ rtems_task Task_1_through_5(
|
||||
}
|
||||
printf("mallocing %d bytes\n",mem_amt);
|
||||
memset( mem_ptr, mem_amt, mem_amt );
|
||||
malloc_report_statistics();
|
||||
malloc_walk_ok = malloc_walk( 1, false );
|
||||
rtems_test_assert( malloc_walk_ok );
|
||||
status = rtems_task_wake_after(
|
||||
|
||||
Reference in New Issue
Block a user