[fpc-devel] ReallocMem with CMem

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Mar 8 20:49:41 CET 2006


On 8 mrt 2006, at 20:34, Michael Van Canneyt wrote:

>>> What has 'alloc' to do with cleaning/zeroing?
>>
>> It is *the* difference between GetMem and AllocMem.
>
> Not in FPC. Reallocmem just resizes. No zeroing is done, as already  
> explained
> by Jonas and Daniel.

Yes, but allocmem() does zero the allocated memory (although our  
documentation at http://www.freepascal.org/docs-html/rtl/system/ 
allocmem.html claims it's the same as getmem, that's not true -- I  
guess because in Delphi it also zeroes the allocated memory with  
allocmem).


Jonas




More information about the fpc-devel mailing list