Dan Sugalski <[EMAIL PROTECTED]> wrote:
> Okay, now that we're getting more into extensions and NCI access, we
> need to add an extra array to the root set of the interpreter.

> ... (A PMC may be in the registry multiple times, and if so
> each unregister removes *one* reference)

> 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.

The hash wins, when about 4 or 5 PMCs are in the array - IIRC.

[1] pmc_freeze.c has one of these

Q: Is there any chance, that these PMCs get shared, leak out from one
into another interpreter/thread?

leo

Reply via email to