aboutsummaryrefslogtreecommitdiff
path: root/lgc.h
diff options
context:
space:
mode:
Diffstat (limited to 'lgc.h')
-rw-r--r--lgc.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/lgc.h b/lgc.h
index 36f361ec..5113e922 100644
--- a/lgc.h
+++ b/lgc.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.h,v 2.97 2017/05/04 13:32:01 roberto Exp roberto $ 2** $Id: lgc.h,v 2.98 2017/05/26 19:14:29 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -119,10 +119,20 @@
119 119
120/* Default Values for GC parameters */ 120/* Default Values for GC parameters */
121#define LUAI_GENMAJORMUL 100 121#define LUAI_GENMAJORMUL 100
122#define LUAI_GENMINORMUL 5 122#define LUAI_GENMINORMUL 12
123
124/* wait memory to double before starting new cycle */
125#define LUAI_GCPAUSE 200 /* 200% */
126
127/*
128** gc parameters are stored divided by 4 to allow a maximum value larger
129** than 1000 in an 'lu_byte'.
130*/
131#define getgcparam(p) ((p) * 4)
132#define setgcparam(p,v) ((p) = (v) / 4)
133
134#define LUAI_GCMUL 100
123 135
124#define LUAI_GCPAUSE 100 /* 100% */
125#define LUAI_GCMUL 10
126/* how much to allocate before next GC step (log2) */ 136/* how much to allocate before next GC step (log2) */
127#define LUAI_GCSTEPSIZE 13 /* 8 KB */ 137#define LUAI_GCSTEPSIZE 13 /* 8 KB */
128 138