summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-08-09 10:36:25 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-10-25 14:54:05 +0200
commit3b978e190de6774d5e8728085c6e48ef91454c52 (patch)
tree52fdc28fd952a7896f3cd39713b81e270c57b307
parentEliminate unused var 'digit'. (diff)
downloadrtems-3b978e190de6774d5e8728085c6e48ef91454c52.tar.bz2
libcsupport: malloc_deferred_frees_initialize()
Remove this function and statically initialize RTEMS_Malloc_GC_list.
-rw-r--r--cpukit/libcsupport/src/malloc_deferred.c7
-rw-r--r--cpukit/libcsupport/src/malloc_initialize.c5
-rw-r--r--cpukit/libcsupport/src/malloc_p.h1
3 files changed, 1 insertions, 12 deletions
diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c
index af46c5138e..28c6379b86 100644
--- a/cpukit/libcsupport/src/malloc_deferred.c
+++ b/cpukit/libcsupport/src/malloc_deferred.c
@@ -20,7 +20,7 @@
#include "malloc_p.h"
-rtems_chain_control RTEMS_Malloc_GC_list;
+RTEMS_CHAIN_DEFINE_EMPTY(RTEMS_Malloc_GC_list);
bool malloc_is_system_state_OK(void)
{
@@ -33,11 +33,6 @@ bool malloc_is_system_state_OK(void)
return true;
}
-void malloc_deferred_frees_initialize(void)
-{
- rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
-}
-
void malloc_deferred_frees_process(void)
{
rtems_chain_node *to_be_freed;
diff --git a/cpukit/libcsupport/src/malloc_initialize.c b/cpukit/libcsupport/src/malloc_initialize.c
index b0a6ada018..fccddd1368 100644
--- a/cpukit/libcsupport/src/malloc_initialize.c
+++ b/cpukit/libcsupport/src/malloc_initialize.c
@@ -49,11 +49,6 @@ void RTEMS_Malloc_Initialize(
}
/*
- * Initialize the garbage collection list to start with nothing on it.
- */
- malloc_deferred_frees_initialize();
-
- /*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
diff --git a/cpukit/libcsupport/src/malloc_p.h b/cpukit/libcsupport/src/malloc_p.h
index 7ada01c592..ea0709f0e7 100644
--- a/cpukit/libcsupport/src/malloc_p.h
+++ b/cpukit/libcsupport/src/malloc_p.h
@@ -38,6 +38,5 @@ extern rtems_malloc_statistics_t rtems_malloc_statistics;
* Process deferred free operations
*/
bool malloc_is_system_state_OK(void);
-void malloc_deferred_frees_initialize(void);
void malloc_deferred_frees_process(void);
void malloc_deferred_free(void *);