[fpc-devel] ReallocMem with CMem

Michael Van Canneyt michael at freepascal.org
Wed Mar 8 21:16:10 CET 2006



On Wed, 8 Mar 2006, Jonas Maebe wrote:

>
> 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).

I'll change the docs accordingly.

Michael.



More information about the fpc-devel mailing list