gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Protential library error in Storage.mod


From: Michael Riedl
Subject: [Gm2] Protential library error in Storage.mod
Date: Mon, 16 Feb 2015 08:39:24 +0100

Hallo Gaius,

I encountered a small issue with the ALLOCATE / DEALLOCATE routines.

I get the impression that 

PROCEDURE DEALLOCATE (VAR addr: SYSTEM.ADDRESS; amount: CARDINAL) ;
BEGIN
   IF VerifyDeallocate (addr, amount) THEN
     free (addr);
   END;
END DEALLOCATE ;

does not set addr to NIL as I would expect. Perhaps it might be an idea
to add an explicit "addr:=NIL;" statement after the call to "free".
Reading the malloc/free man pages did not give me a clear idea how libc
should handle that ...

Gruß / Regards

Michael



reply via email to

[Prev in Thread] Current Thread [Next in Thread]