Heap4 consistency check

Everyone knows how hard it is to find memory overflow bugs in FreeRTOS. Each task has its own stack. The stacks are allocated on heap. The heap is common for all task.
Heap regions are organized in a linked list. When a overflowing write is performed to an allocated memory region, then the list header of the next record is corrupted, resulting in corruption of the next allocations and frees.
There is a struct in heap_4.c

typedef struct A_BLOCK_LINK {
    struct A_BLOCK_LINK* pxNextFreeBlock; /*<< The next free block in the list. */
    size_t xBlockSize;                    /*<< The size of the free block. */
    uint8_t crc8;
} BlockLink_t;

One can add a crc8 field to this struct.
This field can be set and checked on every block allocation and list manipulation to find memory leaks.
Has anyone done it? heap_4.c is complicated and there are too many places to insert crc creation and check calls.

If you want to do that, you can use our list implementation as a reference - FreeRTOS-Kernel/list.h at main · FreeRTOS/FreeRTOS-Kernel · GitHub

Just note that this technique only allows you detect corruption after it has happened.

Thanks. This requires a complete rewrite of heap_4.c