After a "bad collections", avoid switching back back to generational

After a major bad collection (one that collects too few objects),
next collection will be major again. In that case, avoid switching
back to generational mode (as it will have to switch again to
incremental to do next major collection).
This commit is contained in:
Roberto Ierusalimschy
2019-01-30 11:44:42 -02:00
parent 264659bd53
commit 2c32bff609
6 changed files with 135 additions and 51 deletions

View File

@@ -193,6 +193,7 @@ typedef struct global_State {
l_mem totalbytes; /* number of bytes currently allocated - GCdebt */
l_mem GCdebt; /* bytes allocated not yet compensated by the collector */
lu_mem GCestimate; /* an estimate of the non-garbage memory in use */
lu_mem lastatomic; /* see function 'genstep' in file 'lgc.c' */
stringtable strt; /* hash table for strings */
TValue l_registry;
TValue nilvalue; /* a nil value */