While I have been following this list for a while, I am not totally up to
speed with the ins and outs of contributing to the cause.

I want to propose that we should wrap free() just like the other memory
allocation routines are. In other words, create an xfree() in util.c and
call that instead of free().

I have yet to set up a development environment that will allow me to make
this change and submit the patch, but will do so if this change is going to
be accepted.

Reasons for doing this are:

- consistency with other memory allocation routines
- foreshadow possible memory allocation/deallocation auditing

On the second point, the way that I would do this is to change x...()
routines into macros that pass __FILE__ and __LINE__ to other routines
(call them _x...()) which are then able to track allocation and
deallocation by file name and line number. This proves useful in tracking
memory leaks. But of course free() has to have the same treatment.

So, how about it?

Regards
Tony
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to