Files
rtems/testsuites/libtests/malloc03/init.c
Jennifer Averett 71a30785f2 2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* Makefile.am, configure.ac: Added test that attempts to free stack
	memory. This causes a error to be printed from the free function.
	* malloc03/.cvsignore, malloc03/Makefile.am, malloc03/init.c,
	malloc03/malloc03.doc, malloc03/malloc03.scn: New files.
2010-06-22 19:27:12 +00:00

45 lines
883 B
C

/*
* 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.com/license/LICENSE.
*
* $Id$
*/
#include <tmacros.h>
#include "test_support.h"
rtems_task Init(
rtems_task_argument argument
)
{
void *p1;
unsigned int val = 999;
puts( "\n\n*** TEST MALLOC03 ***" );
p1 = &val;
printf("Attempt to free stack memory\n");
free( p1 );
puts( "*** END OF TEST MALLOC03 ***" );
rtems_test_exit(0);
}
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
/* end of file */