Josef Urban wrote:
I am looking for a clean way, how to get rid of the heap marking in gpc-20030830.
A clean way is, of course, not having to use the `System' unit at all. It's meant for the last bits of BP compatibility which can't be implemented in a cleaner way.
Which features of `System' do you (think you) need? If you use `System' only because you're used to it from BP, just get rid of it.
It seems to me that the simplest way how to do it now, is to comment the
Mark (FirstMark)
statement in system.pas:808 (initialization code), but I think that there should be a better way, particularly after reading this GPC posting: http://www.gnu-pascal.de/crystal/gpc/en/mail8202.html . It says:
PrepareDisposePointer shouldn't do much unless `Mark' is used (anywhere in the program) which, e.g., the `HeapMon' unit does. If you use either of them, this probably explains it. `Mark' is not optimized for speed (I consider it mostly an outdated and/or debugging thing).
The speed-up factor is pretty significant - 8-12 times faster without marking - since I have milions or tens of milions (de)allocations.
If really necessary, we could add another conditional (like the other three), at the cost of breaking `AllocMemSize' and `AllocMemCount'.
Frank