diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-05-11 16:22:33 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-05-11 16:22:33 -0300 |
commit | 31829ad1770223833bcbdab634e25cdfd911633d (patch) | |
tree | a3c5becabd437e7fc550ef19e1f38c69e18e70c9 /lgc.c | |
parent | c2361e0b6108a2e7e53dcfcdc3a569fcc4a1e31d (diff) | |
download | lua-31829ad1770223833bcbdab634e25cdfd911633d.tar.gz lua-31829ad1770223833bcbdab634e25cdfd911633d.tar.bz2 lua-31829ad1770223833bcbdab634e25cdfd911633d.zip |
test for whether collector is running moved from function to
macro 'luaC_condGC'.
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 2.119 2012/01/25 21:05:40 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 2.120 2012/05/08 13:53:33 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 | */ |
@@ -1069,9 +1069,9 @@ static void step (lua_State *L) { | |||
1069 | 1069 | ||
1070 | 1070 | ||
1071 | /* | 1071 | /* |
1072 | ** performs a basic GC step even if the collector is stopped | 1072 | ** performs a basic GC step |
1073 | */ | 1073 | */ |
1074 | void luaC_forcestep (lua_State *L) { | 1074 | void luaC_step (lua_State *L) { |
1075 | global_State *g = G(L); | 1075 | global_State *g = G(L); |
1076 | int i; | 1076 | int i; |
1077 | if (isgenerational(g)) generationalcollection(L); | 1077 | if (isgenerational(g)) generationalcollection(L); |
@@ -1082,14 +1082,6 @@ void luaC_forcestep (lua_State *L) { | |||
1082 | 1082 | ||
1083 | 1083 | ||
1084 | /* | 1084 | /* |
1085 | ** performs a basic GC step only if collector is running | ||
1086 | */ | ||
1087 | void luaC_step (lua_State *L) { | ||
1088 | if (G(L)->gcrunning) luaC_forcestep(L); | ||
1089 | } | ||
1090 | |||
1091 | |||
1092 | /* | ||
1093 | ** performs a full GC cycle; if "isemergency", does not call | 1085 | ** performs a full GC cycle; if "isemergency", does not call |
1094 | ** finalizers (which could change stack positions) | 1086 | ** finalizers (which could change stack positions) |
1095 | */ | 1087 | */ |