I'm writing a simple linked list based memory manager in the form:
...Header|Block|Header|Block... with a used and free list.
If the realloc() function was asked to reduce the size of a block, is it okay to overwrite some of the trailing bytes with the header for the newly created block? The documentation I've read suggests this is 'undefined behaviour' but do applications depend on the data still being there?