[RTEMS Project] #4032: Make deferred free in malloc() support optional
RTEMS trac
trac at rtems.org
Thu Jul 23 11:54:48 UTC 2020
#4032: Make deferred free in malloc() support optional
------------------------------+-----------------------------
Reporter: Sebastian Huber | Owner: Sebastian Huber
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.1
Component: lib | Version: 6
Severity: normal | Keywords:
Blocked By: | Blocking:
------------------------------+-----------------------------
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 an never free it, this dependency
should be avoided. This can be done with a weak default implementation of
_Malloc_Process_deferred_frees(). In the free() module a strong
implementation can be provided.
--
Ticket URL: <http://devel.rtems.org/ticket/4032>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list