[fpc-devel] Growing a memory stream

Vincent Snijders vsnijders at quicknet.nl
Mon Dec 11 19:03:09 CET 2006


Micha Nelissen schreef:
> Vincent Snijders wrote:
>> Hi,
>>
>> Currently the TMemoryStream grows in steps of 4096 bytes.
> 
> Very nice would be a linked list of 8KB blocks or so, and when you 
> access .Memory, then it's copied into an array.
> 

A (maybe shortsighted) drawback would be that it doubles the amount of 
needed memory, once for the list and once for the memory pointed to with 
Memory?

Vincent



More information about the fpc-devel mailing list