source: rtems/cpukit/libmisc/shell/main_wkspaceinfo.c @ 09293152

4.104.114.95
Last change on this file since 09293152 was 09293152, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jul 31, 2008 at 6:31:04 AM

Remove classinfo_tester.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  MALLOC_INFO Shell Command Implmentation
3 *
4 *  COPYRIGHT (c) 1989-2008.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
15#ifdef HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <inttypes.h>
20
21#include <rtems.h>
22#include <rtems/malloc.h>
23#include <rtems/shell.h>
24#include <rtems/score/protectedheap.h>
25#include "internal.h"
26
27int rtems_shell_main_wkspace_info(
28  int   argc,
29  char *argv[]
30)
31{
32  Heap_Information_block info;
33
34  _Protected_heap_Get_information( &_Workspace_Area, &info );
35  rtems_shell_print_heap_info( "free", &info.Free );
36  rtems_shell_print_heap_info( "used", &info.Used );
37
38  return 0;
39}
40
41rtems_shell_cmd_t rtems_shell_WKSPACE_INFO_Command = {
42  "wkspace",                                  /* name */
43  "Report on RTEMS Executive Workspace",      /* usage */
44  "rtems",                                    /* topic */
45  rtems_shell_main_wkspace_info,              /* command */
46  NULL,                                       /* alias */
47  NULL                                        /* next */
48};
49
Note: See TracBrowser for help on using the repository browser.