diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-04-19 14:02:50 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-04-19 14:02:50 -0300 |
commit | c7bdc0e0e8ab03820b472a87b87c04475def5997 (patch) | |
tree | 991bf63ed4a9f108411529db4db468334d686dc2 /lapi.c | |
parent | a45945b6d511b00b1c84dc73881474030737e956 (diff) | |
download | lua-c7bdc0e0e8ab03820b472a87b87c04475def5997.tar.gz lua-c7bdc0e0e8ab03820b472a87b87c04475def5997.tar.bz2 lua-c7bdc0e0e8ab03820b472a87b87c04475def5997.zip |
first version of control for the generational collector
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.261 2017/04/06 13:08:56 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.262 2017/04/11 18:41:09 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1098,6 +1098,10 @@ LUA_API int lua_gc (lua_State *L, int what, int data) { | |||
1098 | break; | 1098 | break; |
1099 | } | 1099 | } |
1100 | case LUA_GCGEN: { | 1100 | case LUA_GCGEN: { |
1101 | lu_byte aux = data & 0xff; | ||
1102 | g->genminormul = (aux == 0) ? 20 : aux; | ||
1103 | aux = (data >> 8) & 0xff; | ||
1104 | g->genmajormul = (aux == 0) ? 100 : aux; | ||
1101 | luaC_changemode(L, KGC_GEN); | 1105 | luaC_changemode(L, KGC_GEN); |
1102 | break; | 1106 | break; |
1103 | } | 1107 | } |