www.a00.de > tcpgroup > 1995 > msg00082
 

TCP-group 1995


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

Re: NOTICE-WARNING- TIME BOMB!!



This reminds me...

One of the items on my list of things-to-do for my next release of NOS
(yes! I really do plan such a thing!) is a set of macro wrappers for
all functions that free pointer args.

For example, I'll create the following macro:

#define	FREE_P(x)	{free_p(x); x = NULL;}

and then replace all calls to the function free_p() with calls to the
macro FREE_P().

The idea, of course, is to immediately nail any pointer that points to
a freed object. I tried to do this "manually" in many places, but I'm
sure I've missed many spots. This should make it much harder to get a
"freeing garbage" message.

Why this has to be done in macros instead of as modifications to
the function is left as an exercise for the beginning C student... :-)

Phil





Document URL : http://www.a00.de/tcpgroup/1995/msg00082.php
Ralf D. Kloth, Ludwigsburg, DE (QRQ.software). < hostmaster at a00.de > [don't send spam]
Created 2005-01-02. Last modified 2005-01-02. Your visit 2024-04-23 08:55.12. Page created in 0.0227 sec.
 
[Go to the top of this page]   [... to the index page]