fix atom gc to actually recover first atom in the chain.
This commit is contained in:
parent
ecd2fab52e
commit
d0cd5f3fa3
1
C/agc.c
1
C/agc.c
@ -126,6 +126,7 @@ AtomAdjust(Atom a)
|
||||
|
||||
#define REINIT_LOCK(P)
|
||||
#define REINIT_RWLOCK(P)
|
||||
#define NoAGCAtomAdjust(P) (P)
|
||||
#define OrArgAdjust(P)
|
||||
#define TabEntryAdjust(P)
|
||||
#define IntegerAdjust(D) (D)
|
||||
|
@ -391,7 +391,7 @@ RestoreAtoms(void)
|
||||
PtoAtomHashEntryAdjust(Yap_heap_regs->hash_chain);
|
||||
HashPtr = HashChain;
|
||||
for (i = 0; i < AtomHashTableSize; ++i) {
|
||||
HashPtr->Entry = AtomAdjust(HashPtr->Entry);
|
||||
HashPtr->Entry = NoAGCAtomAdjust(HashPtr->Entry);
|
||||
RestoreAtomList(HashPtr->Entry);
|
||||
HashPtr++;
|
||||
}
|
||||
|
16
H/sshift.h
16
H/sshift.h
@ -320,6 +320,14 @@ AtomAdjust (Atom at)
|
||||
return (Atom) ((at));
|
||||
}
|
||||
|
||||
inline EXTERN Atom NoAGCAtomAdjust (Atom);
|
||||
|
||||
inline EXTERN Atom
|
||||
NoAGCAtomAdjust (Atom at)
|
||||
{
|
||||
return (Atom) ((at));
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline EXTERN Prop PropAdjust (Prop);
|
||||
@ -341,6 +349,14 @@ AtomAdjust (Atom at)
|
||||
return (Atom) ((at == NULL ? (at) : (Atom) (CharP (at) + HDiff)));
|
||||
}
|
||||
|
||||
inline EXTERN Atom NoAGCAtomAdjust (Atom);
|
||||
|
||||
inline EXTERN Atom
|
||||
NoAGCAtomAdjust (Atom at)
|
||||
{
|
||||
return (Atom) ((at == NULL ? (at) : (Atom) (CharP (at) + HDiff)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline EXTERN Prop PropAdjust (Prop);
|
||||
|
Reference in New Issue
Block a user