Corrupting pvPortMalloc() metadata

Greetings,

I am using FreeRTOS 10.5.1 with Renesas GNU-RX compiler.
I am trying to evaluate the impact of corrupting a buffer which has been allocated some memory (using heap_4 memory management implementation).

As I understand, a block of metadata will be placed at the beginning of the allocated memory.
This metadata values will be asserted (configASSERT) to decide whether the allocated memory is valid or corrupted.
However, I am having trouble finding information on the values in this metadata.

Could you kindly share documentations or information on this?

Thank you.

You could simply have a look into heap_4.c.

1 Like

I would add to Hartmut’s reply that I wouldn’t expect the meta-data to be documented in anything but internal documentation for the allocator, as every variant of the allocator might use different meta-data, and that meta-data isn’t for the application developer.

As @hs2 and @richard-damon mentioned, these are internal implementation details. Here is the metadata for the heap_4.