> 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?
Current behaviour is compatible with TP7 that gave a valid pointer back pointing to heapend. See also the comment. IMHO doing an AllocMem(0) is an error in your program. Peter _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel