FX wrote:
Hi all,
I've started using libiberty's hashtab in libgfortran for some of my
gfortran work to track memory allocations in the library. I store
custom structures in a hash table, each structure containing a unique
pointer (it is a malloc'ed address) that is used for the hash. When I
traverse the table elements after having inserted a few, I get twice
the number I expect. It's probably a beginner's mistake, and will be
easy to spot, but I haven't managed to understand what I'm doing
wrong.
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.
Paolo