Am 06.10.2010 05:57, schrieb Adem: > I did a global search on trunk\compiler and found the following numbers: > > GetMem(): 212 hits > FillChar(): 362 hits > > I haven't checked any other fpc folder, but I am sure those figures > would multiply. > > What I did notice was that GetMem() and FillChar() were being used in > pairs most of the time --as opposed to using AllocMem() which had 16 hits. > > My focus isn't on the merits of using AllocMem() instead of GetMem() and > FillChar() pair; what I do notice is the fact that in a lot of places > there is a strong need for zeroed memory. > > That brings me to the idea of handling the zeroing of memory chunks by > the memory manager (MM) instead of doing it in-line.
A similiar idea has been discussed already here: <http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg17846.html> Besides this, it is pretty simple: give it a try and provide a patch. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel