[fpc-devel] GetMem(SomePointer, 0) <> nil
Alexander Klenin
klenin at gmail.com
Wed Mar 2 01:23:09 CET 2011
On Wed, Mar 2, 2011 at 01:01, Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:
> 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.
Maybe {$mode delphi} should by default install dephi-compatible memory manager?
--
Alexander S. Klenin
More information about the fpc-devel
mailing list