Changeset 7746b0de in rtems for cpukit

Timestamp:
04/08/20 08:28:47 (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
4444094d
Parents:
6f94a83
git-author:
Sebastian Huber <sebastian.huber@…> (04/08/20 08:28:47)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/24/20 05:14:02)
Message:

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.

(No files)

Note: See TracChangeset for help on using the changeset viewer.