[DGD] dump/restore

Felix A. Croes felix at dworkin.nl
Sun Dec 23 00:35:26 CET 2007


bart at wotf.org wrote:

> While investigating my dump/restore issue, I stumbled upon o_sweep().
> I noticed it is called after a dump or restore. I'm curious as to why it is
> called after a dump, I'd somewhat expect it to happen before a dump?

I'm not sure why you should think so.

The function accomplishes two things.  First, it marks every object
as present in the dump file, rather than the swap file.  Second,
it changes the "count" field of each object and prepares to also
change it in each object reference later, while the swap file is
rebuilt.  Running this function just before a state dump, instead
of just after, would probably turn a lot of object references in
that state dump into nil values, though if you're lucky and no
objects were added or removed after the previous statedump, it
might not.

Regards,
Dworkin



More information about the DGD mailing list