[fpc-devel] GetMem(SomePointer, 0) <> nil

Hans-Peter Diettrich DrDiettrich1 at aol.com
Tue Mar 1 16:01:25 CET 2011


Paul Ishenin schrieb:

> I noticed today that if I want to allocate 0 bytes I get not a nil but a 
> valid pointer. Why?

This will allow for a following Realloc.

Even in Delphi the behaviour may be subject to the installed memory manager.

DoDi




More information about the fpc-devel mailing list