diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2010-06-22 19:27:12 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2010-06-22 19:27:12 +0000 |
commit | 71a30785f2181934522672fd432d57f37f371e76 (patch) | |
tree | f1fb97d6b45fd155dfb37cc75931e7886abb1a75 /testsuites/libtests/malloc03/init.c | |
parent | 2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff) | |
download | rtems-71a30785f2181934522672fd432d57f37f371e76.tar.bz2 |
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.
Diffstat (limited to '')
-rw-r--r-- | testsuites/libtests/malloc03/init.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/testsuites/libtests/malloc03/init.c b/testsuites/libtests/malloc03/init.c new file mode 100644 index 0000000000..5779ed99a0 --- /dev/null +++ b/testsuites/libtests/malloc03/init.c @@ -0,0 +1,44 @@ +/* + * 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 */ |