aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-11-17 09:56:03 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-11-17 09:56:03 -0200
commitb51d76ce8dfeb1dd3cc3e69b32cf665ff32ff26e (patch)
tree70d01f1f8473839b64cfbefc175de2f2e1542832
parent95020afb6385f3c1293118c4950e9fb6299cef5a (diff)
downloadlua-b51d76ce8dfeb1dd3cc3e69b32cf665ff32ff26e.tar.gz
lua-b51d76ce8dfeb1dd3cc3e69b32cf665ff32ff26e.tar.bz2
lua-b51d76ce8dfeb1dd3cc3e69b32cf665ff32ff26e.zip
when doing hard memory tests, perform a full GC at every possible step
-rw-r--r--lgc.h4
-rw-r--r--llimits.h8
2 files changed, 9 insertions, 3 deletions
diff --git a/lgc.h b/lgc.h
index abceca78..e79eb5db 100644
--- a/lgc.h
+++ b/lgc.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.h,v 2.20 2009/04/28 19:04:36 roberto Exp roberto $ 2** $Id: lgc.h,v 2.21 2009/06/08 19:35:59 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*/
@@ -79,7 +79,7 @@
79 79
80 80
81#define luaC_checkGC(L) \ 81#define luaC_checkGC(L) \
82 {condmovestack(L); if (G(L)->totalbytes >= G(L)->GCthreshold) luaC_step(L);} 82 {condchangemem(L); if (G(L)->totalbytes >= G(L)->GCthreshold) luaC_step(L);}
83 83
84 84
85#define luaC_barrier(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \ 85#define luaC_barrier(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \
diff --git a/llimits.h b/llimits.h
index 4401c95e..361fdbce 100644
--- a/llimits.h
+++ b/llimits.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llimits.h,v 1.73 2009/07/15 17:26:14 roberto Exp roberto $ 2** $Id: llimits.h,v 1.74 2009/08/31 14:26:28 roberto Exp roberto $
3** Limits, basic types, and some other `installation-dependent' definitions 3** Limits, basic types, and some other `installation-dependent' definitions
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -128,4 +128,10 @@ typedef lu_int32 Instruction;
128#define condmovestack(L) luaD_reallocstack((L), (L)->stacksize) 128#define condmovestack(L) luaD_reallocstack((L), (L)->stacksize)
129#endif 129#endif
130 130
131#if !defined(HARDMEMTESTS)
132#define condchangemem(L) condmovestack(L)
133#else
134#define condchangemem(L) luaC_fullgc(L, 0)
135#endif
136
131#endif 137#endif