[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

thin pointers and EXIDs



Abstract: right now every XID goes to the GrandMap to fetch its
IObject.  I think I figured out how to use thin pointers (weak on
disk) to allow ActualXIDs to directly know about their IObject, so
that only named IDs need to be in the GrandMap.

Restriction: if A has a thin pointer to a shepherd B, B must have a
thick pointer to A.  The thin pointer in A is stored out as the
location of B, but not a stub for B.  Then when A wants to follow the
thin pointer, it brings in B, makes sure it is of the right class, and
then asks it if its pointer taht should be to A actaully points at A.

I'll now describe the specific application to ActualXIDs.

A new class ThinXID is polymorphic with ActualXID and may become
instances.  When an ActualXID is first read from disk, it is actually
constructed as a ThinXID (call it S) with the location of its supposed
IObject.  When S is asked for its IObject, it fetches the shepherd at
that location from the SnarfPacker.  If the shepherd is an IObject,
then ask it for its XID.  If the returned XID is EQ to S, then S
becomes an equivalent ActualXID that actually points at the IObject,
then returns the IObject.  If any of these conditions fail, then S
becomes an ActualXID that points at NULL, and returns NULL.

Whew!  If you don't understand this and you care, come find me....

dean