Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:Why not just have the hash value be an integer, then each register increments it and each unregister decrements it. With the entry getting removed if it hits 0.
It's fine for this to be a simple array for now. I realize that means
O(n) access times,
I'd use a custom hash with the PMC address being the key[1]. /Me thinks, it doesn't help, when a PMC gets registered multiple times - its always the same address - removing it multiple times is fine, the first succeeds, following fail silently, they do nothing.
That'd work as well. I'm easy -- I want it to work, and I don't care. :) The interface is what I want, and the underlying implementation need only be known to the code that does the register/unregister and potentially the DOD.
On a side note, couldn't this be used for the explicit root set augmentation version of DOD that was discussed?
If you're speaking of what I think you are (my memory sucks) then this is exactly that. If you're not speaking of what I think you are, then no it isn't, but you can probably use it for that. :)
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk