[fpc-devel] ReallocMem with CMem
Michael Van Canneyt
michael at freepascal.org
Wed Mar 8 20:34:36 CET 2006
On Wed, 8 Mar 2006, Micha Nelissen wrote:
> On Wed, 8 Mar 2006 19:10:55 +0100
> Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> > On Wed, 8 Mar 2006 19:01:11 +0100
> > Micha Nelissen <micha at neli.hopto.org> wrote:
> > > Hmm, that was changed then and the compiler was fixed; probably due to me
> > > mentioning it on IRC sometime ago, also :-). The name has 'alloc' in it,
> > > so maybe that's why I keep getting confused, ResizeMem or so would be more
> > > appropriate.
> > 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.
Only classes/objects that are allocated on the heap are zeroed.
Plain memory is not touched in any way.
More information about the fpc-devel