[fpc-devel] AllocMem(0)<>nil

petr.kristan at epos.cz petr.kristan at epos.cz
Tue Mar 25 18:04:49 CET 2008


Hi.

I discovered some Delphi incompatibility. Call AllocMem(0) do not return nil. 
Fpc from svn.

In SysGetMem are some comments about it:

  if size=0 then
    { we always need to allocate something, using heapend is not possible,
      because heappend can be changed by growheap (PFV) }
    size := 1;

Is this behaviour essential, or is possible make it compatible with
Delphi?

Petr

-- 
Ing. Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223    Czech Republic (Eastern Europe) 
fax: +420 466510709



More information about the fpc-devel mailing list