[fpc-devel] an observation about GetMem

Michael Schnell mschnell at lumino.de
Fri Sep 5 08:52:44 CEST 2008


Peter Popov wrote:
> As I was porting things from delphi to fp today I noticed the 
> following difference:
>
> Delphi (2,5)       : GetMem(p, 0) will set p to nil.
> FPC (2.2.2, 2.3.1) : GetMem(p, 0) will assign something to p
>
Should it be forbidden do allocate a buffer of size 0 and reallocate it 
later for a bigger size ?

-Michael



More information about the fpc-devel mailing list