First version of GC counting objects for control

Still needs to review generational mode.
This commit is contained in:
Roberto Ierusalimschy
2022-11-23 17:17:20 -03:00
parent 76953316d1
commit f356d5acdd
9 changed files with 162 additions and 156 deletions

6
lgc.h
View File

@@ -135,10 +135,10 @@
#define getgcparam(p) ((p) * 4)
#define setgcparam(p,v) ((p) = (v) / 4)
#define LUAI_GCMUL 100
#define LUAI_GCMUL 300
/* how much to allocate before next GC step (log2) */
#define LUAI_GCSTEPSIZE 13 /* 8 KB */
/* how many objects to allocate before next GC step (log2) */
#define LUAI_GCSTEPSIZE 8 /* 256 objects */
/*