On 05 Sep 2008, at 17:25, Peter Popov wrote:

In FPC it is done by design. If 0 bytes are asked we allocate at least the minimum alignment to get a valid pointer. This is done for compatibility with TP7.0 that returns the value of heapptr
which is also a valid pointer.

Thanks for the clarification!
I guess if you switch to reallocmem entirely, there will be delphi compatibility, yes?

reallocmem indeed frees the memory and sets the pointer to nil if you specify "0" as the memory size.


Jonas
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to