I wonder what would happen if this internal memory counter overflows;
If I run a program like this
while True do
FreeMem(GetMem(1000));
it should overflow sooner or later
the question is: when exactly? maybe it will take centuries
This number is of type PtrUInt:
On 32 bit applications it is 4 bytes so it overflows when it reaches 4,294,967,295. Which is the 4 GB limit of memory for one application in that architecture (32 address lines).
After going 4,294,967 times through that loop.
On 64 bit applications it is 8 bytes so it overflows when it reaches 18,446,744,073,709,551,615.
After going 18,446,744,073,709,551 times through that loop.