#511 closed defect (fixed)
Defer free() while in dispatch critical section
Reported by: | Joel Sherrill | Owned by: | Jennifer Averett |
---|---|---|---|
Priority: | normal | Milestone: | 2 |
Component: | fs | Version: | 4.6 |
Severity: | major | Keywords: | |
Cc: | bugs@…, joel.sherrill@… | Blocked By: | |
Blocking: |
Description
If you attempt to malloc(), realloc(), free() from an ISR
or Thread Dispatching disabled critical section, then
very bad things can happen. This patch causes malloc()
and realloc() to fail when called at inappropriate times
and adds a deferred free() garbage collection list. Freeing
of blocks is deferred until the next malloc() invocation.
No solution is perfect but at least this keeps the burden
of the deferred frees in the context of a task which is
doing memory allocation anyway. At least all freed
memory should be in the heap before any mallocs
are allowed.
Release:
RTEMS-4.6 and trunk
Attachments (1)
Change History (2)
comment:1 Changed on 10/22/03 at 15:54:38 by Joel Sherrill
Status: | assigned → closed |
---|
Note: See
TracTickets for help on using
tickets.
State-Changed-From-To: open->closed
State-Changed-Why: Patch applied to branch and trunk.