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.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to