source: rtems/testsuites/libtests/malloc05/init.c @ 8911ffd

4.115
Last change on this file since 8911ffd was 8911ffd, checked in by Joel Sherrill <joel.sherrill@…>, on 07/14/10 at 23:29:45

2010-07-14 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, configure.ac: Add new test to exercise malloc_get_statistics().
  • malloc05/.cvsignore, malloc05/Makefile.am, malloc05/init.c, malloc05/malloc05.doc, malloc05/malloc05.scn: New files.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2010.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#include <tmacros.h>
13#include "test_support.h"
14#include <rtems/malloc.h>
15
16rtems_task Init(
17  rtems_task_argument argument
18)
19{
20  int                        sc;
21  rtems_malloc_statistics_t  stats;
22
23  puts( "\n\n*** TEST MALLOC05 ***" );
24
25  puts( "malloc_get_statistics( NULL ) - returns -1" );
26  sc = malloc_get_statistics( NULL );
27  rtems_test_assert( sc == -1 );
28
29  puts( "malloc_get_statistics( &stats ) - returns -0" );
30  sc = malloc_get_statistics( &stats );
31  rtems_test_assert( sc == 0 );
32
33  puts( "*** END OF TEST MALLOC05 ***" );
34
35  rtems_test_exit(0);
36}
37
38/* configuration information */
39
40#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
41#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
42
43#define CONFIGURE_MAXIMUM_TASKS             1
44#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
45
46#define CONFIGURE_INIT
47
48#include <rtems/confdefs.h>
49/* end of file */
Note: See TracBrowser for help on using the repository browser.