[PATCH 1/6] libcsupport: malloc_deferred_frees_initialize()
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Oct 15 13:13:52 UTC 2012
Remove this function and statically initialize RTEMS_Malloc_GC_list.
---
cpukit/libcsupport/src/malloc_deferred.c | 7 +------
cpukit/libcsupport/src/malloc_initialize.c | 5 -----
cpukit/libcsupport/src/malloc_p.h | 1 -
3 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c
index af46c51..28c6379 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 b0a6ada..fccddd1 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 7ada01c..ea0709f 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 *);
--
1.7.7
More information about the devel
mailing list