> On Fri, 2 Feb 2007, Marco van de Voort wrote: > > > > Can anyone recommend a method to search a whole drive, of arbitrary > > > size, without running out of memory. > > > > I don't know seen SysTools, but I worked analysing logfiles for a year. All > > containertypes (TList TObjectList and TstringList included) that have a > > single array as internal datastructure become prone to fragmentation or > > slowdowns when the number of elements get bigger. > > If you approximately know the number of elements in advance, you can > reduce the fragmentation to nearly zero if you set the capacity of the > list before filling it.
The reallocations at the end hurt the most. So if you guess slightly too low it still fails. > It will also speed up the loading of the list. (not if it is sorted). _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal