According to the OpenGroup standard
(here<http://pubs.opengroup.org/onlinepubs/009695399/functions/free.html>), and
in Linux (here<http://linux.die.net/man/3/malloc>), free should ignore a NULL
pointer. "If ptr is a null pointer, no action shall occur." Even the header for
free() in StdLib's implementation has this line.
However, the implementation in Malloc.c has:
void
free(void *Ptr)
{
(void) gBS->FreePool (Ptr);
}
However, FreePool does not have this behavior guarantee (thus the various
"safe" FreePool functions in libraries).
if (Ptr != NULL) {
(void) gBS->FreePool (Ptr);
}
------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel