> If you don't need GC and you don't need delete (the latter I can't see > from your example), a pointer_map is much easier to use.
I'm going to use it for registering memory allocation: pointers malloc'ed will be registered, along with the source location of the allocation; when freed, I fetch the entry that was registered for this pointer, and remove it from the table. The structures left at the end (which correspond to memory leaks) are then displayed to allow the user to fix his leaks. The CPU usage is probably the limiting factor, here, as I want to avoid slowing the program down more than necessary. I guess that, because I need to delete entries, the pointer_map wouldn't work, is that right? Plus, pointer_map is not library code... Thanks for the suggestion, I'll look more deeply into pointer-set.c. FX -- FX Coudert http://www.homepages.ucl.ac.uk/~uccafco/