[DGD]Swapped-out objects

E. Harte harte at xs4all.nl
Thu Jun 15 09:37:56 CEST 2000


On Wed, 14 Jun 2000, Tavis Elliott wrote:

> I was recently looking at the reset() functionality I have implemented, and it
> occured to me that it is going to sweep through _all_ objects to call reset().
>  This means any swapped-out objects will get sucked back into memory.  Is there
> anyway I can tell if an object is swapped out before I call reset() on it, and
> leave it peacefully where it is?
>
> Followup:  Assuming I can accomplish the above, is there a way to have some
> object get called when an object is swapped back _in_ to see if it needs reset()
> called on it?

Both not that I'm aware of, so you'd have to go about modifying DGD's C
source.

<...>
> If all else fails I guess I'll start a DB somewhere that tracks objects and
> 'last-touched' type information.  Now that would be something interesting for
> status() to return about an object.  The last time any function was called in
> the object.

Theoretically you could override call_other() to do that, but I think that
cause a 'slight' overhead because for every call you'd make another one to
a central object.  This could be avoided by using the 'thread storage'
having a mapping there of objects that you have visited so far, which
would be used at the end of the thread to inform the relevant object.

Hope that helps,

Erwin.
-- 
Erwin Harte  -  Forever September, 2480 and counting  -  harte at xs4all.nl
[ 7:30am  up 3 days, 20:09, 13 users,  load average: 0.01, 0.07, 0.08 ]


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list