Files
rtems/cpukit/libcsupport/src/mallocinfo.c
Sebastian Huber 47a3cd8f73 score: Work area initialization API change
The work areas (RTEMS work space and C program heap) will be initialized
now in a separate step and are no longer part of
rtems_initialize_data_structures().  Initialization is performed with
tables of Heap_Area entries.  This allows usage of scattered memory
areas present on various small scale micro-controllers.

The sbrk() support API changes also.  The bsp_sbrk_init() must now deal
with a minimum size for the first memory chunk to take the configured
work space size into account.
2012-10-25 14:54:06 +02:00

34 lines
628 B
C

/*
* RTEMS Malloc Get Status Information
*
*
* COPYRIGHT (c) 1989-2007.
* 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.
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/malloc.h>
#include <rtems/score/protectedheap.h>
/*
* Find amount of free heap remaining
*/
int malloc_info(
Heap_Information_block *the_info
)
{
if ( !the_info )
return -1;
_Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info );
return 0;
}