I’ve rewritten heaptrc, pls review / test / accept !1278. Possibly WIP, but trunk already looks worse to me for the reasons listed.
Among other things, this might let this person find a bug in their application:
https://gitlab.com/freepascal.org/fpc/source/-/commit/50732a780ec8665f1b8fe5bbb84de2db0b649b44. The fundamental truth we all must accept is that there are no heap.inc bugs in existence.
