From b4c353434f28f3e9d4c45e61d42b4fd07d76cad2 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 29 Jul 2020 11:34:08 -0300 Subject: Details The fields 'old' and 'finobjold' were renamed 'old1' and 'finobjold1', respectively, to make clearer the main ages of their elements. --- lstate.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 0c545ec5..c02b4c8b 100644 --- a/lstate.h +++ b/lstate.h @@ -32,13 +32,20 @@ ** ** 'allgc' -> 'survival': new objects; ** 'survival' -> 'old': objects that survived one collection; -** 'old' -> 'reallyold': objects that became old in last collection; +** 'old1' -> 'reallyold': objects that became old in last collection; ** 'reallyold' -> NULL: objects old for more than one cycle. ** ** 'finobj' -> 'finobjsur': new objects marked for finalization; -** 'finobjsur' -> 'finobjold': survived """"; -** 'finobjold' -> 'finobjrold': just old """"; +** 'finobjsur' -> 'finobjold1': survived """"; +** 'finobjold1' -> 'finobjrold': just old """"; ** 'finobjrold' -> NULL: really old """". +** +** All lists can contain elements older than their main ages, due +** to 'luaC_checkfinalizer' and 'udata2finalize', which move +** objects between the normal lists and the "marked for finalization" +** lists. Moreover, barriers can age young objects in young lists as +** OLD0, which then become OLD1. However, a list never contains +** elements younger than their main ages. */ /* @@ -257,10 +264,10 @@ typedef struct global_State { GCObject *fixedgc; /* list of objects not to be collected */ /* fields for generational collector */ GCObject *survival; /* start of objects that survived one GC cycle */ - GCObject *old; /* start of old objects */ - GCObject *reallyold; /* old objects with more than one cycle */ + GCObject *old1; /* start of old1 objects */ + GCObject *reallyold; /* objects more than one cycle old ("really old") */ GCObject *finobjsur; /* list of survival objects with finalizers */ - GCObject *finobjold; /* list of old objects with finalizers */ + GCObject *finobjold1; /* list of old1 objects with finalizers */ GCObject *finobjrold; /* list of really old objects with finalizers */ struct lua_State *twups; /* list of threads with open upvalues */ lua_CFunction panic; /* to be called in unprotected errors */ -- cgit v1.2.3-55-g6feb