If somebody doesn't want to understand the difference between RAW memory allocation (getmem) and CLEAN memory allocation (allocmem),
Wut?
I do call FillChar(b^, newallocsize, 0); there.
I was hoping to create a custom MM quickly, in a couple of hours, for a specific debugging purpose. So writing
optimal code wasn't my goal. Writing
working code was.
This means in practice that the unit implementing the memory manager should be the first in the uses clause of your program or library, since it will then be initialized before all other units - except the system unit itself, of course.
I though I had a workaround for that: my MM marked each block with a signature (at negative offset relative to the memory block returned by it) in and passed the call to OldMM if there was no such signature.
It would have worked, too (with negligible chance of crash), if not the topic of this thread.
heaptrc
It includes lineinfo but lineinfo either causes my custom lineinfo to fail (-gl, no -gw2) or it fails itself (-gw2, no -gl) Either way my game engine reports all exception addresses in useless hexadecimals.
Anyway, since the simple solution failed I'm going to create an extensible memory manager using mmap, mremap, VirtualAlloc, MapViewOfFile and the like. There is no need to hold back
Should be way easier than taming heaptrc, right?