On Thu, 4 Sep 2003 09:02:18 -0400 (EDT), Dan Sugalski wrote:
> On Wed, 3 Sep 2003, Gordon Henriksen wrote:
> > A seen hash is also threadsafe, can be interrupted by DoD, and is safe
> > for recursion. (By "threadsafe," I mean that unchanged data structures
> > can be safely serialized from multiple threads without ill effect or
> > possibility of deadlock.)
>
> While a seen hash is DOD-interruptable (which, admittedly, the scheme I'm
> preferring isn't, or is with a *lot* of care) it's also slower and
> requires a lot more resources when running.

If you're freezing a large graph of PMCs, that's going to take up a lot of
memory, however you do it (other than streaming to disk). What happens when
you run out, and need to garbage collect? With your scheme, this is a big
problem, since as you say, it's either not possible or needs a lot of care.
Actually, it seems like it would need unfeasible amounts of care to me, such
as recording which PMCs are flagged so the flags can be restored after DOD.
Then where's the benefit over a seen hash?

With the seen hash approach, I wouldn't expect the hash itself to take
nearly as much space as the frozen structure; a GC run in the middle of
freezing should only be a problem if you run out of *unreclaimable* memory.

-- 
        Peter Haworth   [EMAIL PROTECTED]
"Nothing in the definition of the word `word' says
 that a word has to be in a dictionary to be called one."
                -- Anu Garg

Reply via email to