forked from Imagelibrary/rtems
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:
@@ -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
|
||||
|
||||
@@ -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', ' ' );
|
||||
|
||||
Reference in New Issue
Block a user