diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-08 22:59:14 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-08 22:59:14 +0000 |
commit | cfcc4e202d928690c46a083ce594aa0d505bf302 (patch) | |
tree | ae22c4fd873aacb37662b661760f4d4ce021acc6 /cpukit/libcsupport/include/rtems/malloc.h | |
parent | 2008-01-08 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-cfcc4e202d928690c46a083ce594aa0d505bf302.tar.bz2 |
2008-01-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/Makefile.am: Add malloc_sbrk_helpers.c.
* libcsupport/include/rtems/malloc.h,
libcsupport/src/malloc.c, libcsupport/src/malloc_initialize.c,
libcsupport/src/malloc_p.h,
libcsupport/src/malloc_statistics_helpers.c: Make sbrk()
support pluggable and optional. This eliminates the need for
heap extend and sbrk in the minimum footprint which is ~2.5K on
the SPARC.
* sapi/include/confdefs.h: Add the following configuration points:
+ CONFIGURE_MALLOC_STATISTICS
+ CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
* libcsupport/src/malloc_sbrk_helpers.c: New file.
Diffstat (limited to 'cpukit/libcsupport/include/rtems/malloc.h')
-rw-r--r-- | cpukit/libcsupport/include/rtems/malloc.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/cpukit/libcsupport/include/rtems/malloc.h b/cpukit/libcsupport/include/rtems/malloc.h index 763830397a..6bb152bbf9 100644 --- a/cpukit/libcsupport/include/rtems/malloc.h +++ b/cpukit/libcsupport/include/rtems/malloc.h @@ -5,14 +5,14 @@ /* * RTEMS Malloc Extensions * - * COPYRIGHT (c) 1989-1997. + * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may in * the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. * - * $ld: + * $Id$ */ #ifndef _RTEMS_MALLOC_H @@ -45,11 +45,11 @@ typedef struct { void (*initialize)(void); void (*at_malloc)(void *); void (*at_free)(void *); -} rtems_malloc_statististics_functions_t; +} rtems_malloc_statistics_functions_t; -extern rtems_malloc_statististics_functions_t +extern rtems_malloc_statistics_functions_t rtems_malloc_statistics_helpers_table; -extern rtems_malloc_statististics_functions_t *rtems_malloc_statistics_helpers; +extern rtems_malloc_statistics_functions_t *rtems_malloc_statistics_helpers; /* * Malloc boundary support plugin @@ -65,7 +65,16 @@ typedef struct { extern rtems_malloc_boundary_functions_t rtems_malloc_boundary_helpers_table; extern rtems_malloc_boundary_functions_t *rtems_malloc_boundary_helpers; +/* + * Malloc Heap Extension (sbrk) plugin + */ +typedef struct { + void *(*initialize)(void *, size_t); + void *(*extend)(size_t); +} rtems_malloc_sbrk_functions_t; +extern rtems_malloc_sbrk_functions_t rtems_malloc_sbrk_helpers_table; +extern rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers; /** @brief Print Malloc Statistic Usage Report * |