2007-12-12 Joel Sherrill <joel.sherrill@OARcorp.com>

* malloctest/init.c: Add some primitive testing of realloc() which also
	does some positive path testing on the SuperCore heap.
This commit is contained in:
Joel Sherrill
2007-12-12 23:10:48 +00:00
parent 189d35652c
commit 9202c24e3e
2 changed files with 22 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2007-12-12 Joel Sherrill <joel.sherrill@OARcorp.com>
* malloctest/init.c: Add some primitive testing of realloc() which also
does some positive path testing on the SuperCore heap.
2007-10-26 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* cpuuse/task2.c, rtmonuse/rtmonuse.scn, rtmonuse/task1.c: Add new

View File

@@ -24,6 +24,21 @@
#define TEST_INIT
#include "system.h"
/*
* A simple test of realloc
*/
void test_realloc(void)
{
void *p1, *p2;
int i;
p2 = p1 = malloc(1);
for (i=2 ; i<2048 ; i++)
p2 = realloc(p2, i);
free(p2);
}
rtems_task Init(
rtems_task_argument argument
)
@@ -37,6 +52,8 @@ rtems_task Init(
status = rtems_clock_set( &time );
directive_failed( status, "rtems_clock_set" );
test_realloc();
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );