[fpc-devel] Overflow in TMemoryStream?

Martok listbox at martoks-place.de
Tue Sep 13 12:23:04 CEST 2016

> I have committed a patch. Please test and report if it is fixed.
> I don't have a 32-bit system available to test on...
Tested on win32: the overflow is fixed, 500M gets incremented by 125M.

I think the RunError is caused by the way ReallocMem works: growing from 869M to
1086M seems to be done by allocating the new area and copying, so there's a
period of almost all of the 2G heap used...

More information about the fpc-devel mailing list