diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-04-08 10:28:47 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-07-24 07:14:02 +0200 |
commit | 7746b0def9787e9806f80a28efbe4c64d2b9e561 (patch) | |
tree | 76968a44a951bb7359f8f33e8763c5b5106e4550 /cpukit/libcsupport/src/malloc_p.h | |
parent | score: Add RTEMS_WEAK (diff) | |
download | rtems-7746b0def9787e9806f80a28efbe4c64d2b9e561.tar.bz2 |
malloc: Make deferred free support optional
Only include the deferred free support if free() is actually used by the
application.
The free() implementation in RTEMS supports that allocated memory is
freed in interrupt context. Since the heap is protected by a mutex, the
frees issued in interrupt context cannot immediately be freed to the
heap, instead they are placed on a deferred free list. This list is
emptied by the core allocation function
rtems_heap_allocate_aligned_with_boundary(). This adds a dependency to
free() in rtems_heap_allocate_aligned_with_boundary(). In order to
better support applications which only allocate memory and never free
it, this dependency should be avoided. Provide a weak default
implementation of _Malloc_Process_deferred_frees() for
rtems_heap_allocate_aligned_with_boundary(). In the free() module
provide the strong implementation.
Close #4032.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libcsupport/src/malloc_p.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/malloc_p.h b/cpukit/libcsupport/src/malloc_p.h index f3715a9966..cb26050ff1 100644 --- a/cpukit/libcsupport/src/malloc_p.h +++ b/cpukit/libcsupport/src/malloc_p.h @@ -25,8 +25,6 @@ typedef enum { Malloc_System_state _Malloc_System_state( void ); -void _Malloc_Deferred_free( void * ); - void _Malloc_Process_deferred_frees( void ); #ifdef __cplusplus |