[fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

Marco van de Voort marcov at stack.nl
Fri May 20 10:12:19 CEST 2016


In our previous episode, Michael Van Canneyt said:
> > But of course all datastructures based on a single array (and thus inviting
> > very large block allocations) are fundamentally flawed because of it in the
> > first place.
> 
> Which is why I recommended going the SAX way and store data manually.

Maybe in this case, but the question remains if tfplist is as good as it can
be. 

For TMemoryStream it was not such a big problem because realloc is virtual.

> There is no single good and simple catch-all mechanism.

So that brings up the question of what is the advantage of still using a
percentage with so very large block sizes? I assume less reallocation tries
make the chance of reaching a larger blocksize more feasable?




More information about the fpc-pascal mailing list