Am Donnerstag, 2. November 2006 10:45 schrieb Per Inge Mathisen: > On 11/1/06, Dennis Schridde <[EMAIL PROTECTED]> wrote: > > MALLOC itself is a macro around some custom wrapper around malloc... > > So perhaps we should also check if we (additionally to using this NEW > > wrapper) could drop that MALLOC malloc wrapper... > > (I don't really know what exact functionality MALLOC and FREE provide, > > besides that FREE checks for NULL pointers, what is useless as free() is > > defined by the C std to do nothing in that case.) > > IIRC, Warzone uses its own malloc for its memory pool system. I had a > go at replacing it with standard malloc and ditch the memory pool > system a while ago, and it turned out to be non-trivial. Checking for > free of null pointers would be nice if they were reported as runtime > warnings or errors; although valgrind can do that, too. k, so perhaps we can enhance that FREE macro for debug builds with extra output in case we free a NULL pointer...
--Dennis
pgpp5mSihlQ83.pgp
Description: PGP signature
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev