Is it possible to use heaptrc to determine whether a pointer refers to a valid block on the heap, so that erroneous disposes can be silently ignored? Alternatively, is there an easy way of scrubbing heap when allocating and deallocating?
Out of curiosity, I'm looking at some 1970s code written using CDC Pascal. By today's standards it's pretty horrid- lots of new() and dispose() with almost all state in global variables, according to valgrind it appears to be releasing blocks that have never been allocated and my suspicion is that the original authors didn't realise they had a problem.
This isn't particularly important, if it looks like something useful I'll rewrite anyway. But I'd prefer to have this even partly functional first.
