wkspace failed allocations with heap protection enabled
joel at rtems.org
Wed Apr 13 15:08:49 UTC 2022
This appears to be a bad side-effect of the way the deferred free is
when the memory protection/fence is enabled. This is turned on by enabling
I'd recommend filing a ticket and assigning it to Sebastian for a real fix.
In the meantime, see if building RTEMS without debug enabled helps.
On Wed, Apr 13, 2022 at 4:30 AM Matthew J Fletcher <amimjf at gmail.com> wrote:
> Investigating the "Total number of failed allocations:" from the
> wkspace cmd i see that;
> /* Statistics */
> Are incremented when _Heap_Allocate_aligned_with_boundary fails, however it
> seems this will routinely fail due to;
> _Heap_Protection_free_all_delayed_blocks seemingly on purpose creating an
> impossibly large allocation.
> uintptr_t large = 0
> - (uintptr_t) HEAP_BLOCK_HEADER_SIZE
> - (uintptr_t) HEAP_ALLOC_BONUS
> - (uintptr_t) 1;
> void *p = _Heap_Allocate( heap, large );
> This makes it difficult to place a breakpoint on failed_allocs to
> investigate true low memory situations with heap protection enabled.
> Matthew J Fletcher
> users mailing list
> users at rtems.org
More information about the users