diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-16 14:42:58 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-16 14:42:58 -0200 |
| commit | 2af0d3b4598060b1086884cfb879d39fa4e0c89a (patch) | |
| tree | bc9b53d4fcc3e5f0dce4ecbfcb568a3948ff9f9d | |
| parent | 9fbe0690fb0d8a64de9046a9c28d08f93e83af2a (diff) | |
| download | lua-2af0d3b4598060b1086884cfb879d39fa4e0c89a.tar.gz lua-2af0d3b4598060b1086884cfb879d39fa4e0c89a.tar.bz2 lua-2af0d3b4598060b1086884cfb879d39fa4e0c89a.zip | |
allocator function receives the tag of object being allocated in 'osize'
when 'ptr' is NULL.
| -rw-r--r-- | lstate.c | 5 | ||||
| -rw-r--r-- | ltests.h | 5 |
2 files changed, 5 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.c,v 2.64 2009/11/18 13:13:47 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.65 2009/12/14 15:27:30 roberto Exp roberto $ |
| 3 | ** Global State | 3 | ** Global State |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -192,8 +192,7 @@ LUA_API lua_State *lua_newthread (lua_State *L) { | |||
| 192 | lua_State *L1; | 192 | lua_State *L1; |
| 193 | lua_lock(L); | 193 | lua_lock(L); |
| 194 | luaC_checkGC(L); | 194 | luaC_checkGC(L); |
| 195 | L1 = &luaM_new(L, LX)->l; | 195 | L1 = &luaC_newobj(L, LUA_TTHREAD, sizeof(LX), NULL, offsetof(LX, l))->th; |
| 196 | luaC_link(L, obj2gco(L1), LUA_TTHREAD); | ||
| 197 | setthvalue(L, L->top, L1); | 196 | setthvalue(L, L->top, L1); |
| 198 | api_incr_top(L); | 197 | api_incr_top(L); |
| 199 | preinit_state(L1, G(L)); | 198 | preinit_state(L1, G(L)); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.h,v 2.26 2009/11/19 19:06:52 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 2.27 2009/12/14 15:27:30 roberto Exp roberto $ |
| 3 | ** Internal Header for Debugging of the Lua Implementation | 3 | ** Internal Header for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -30,9 +30,10 @@ typedef struct Memcontrol { | |||
| 30 | unsigned long total; | 30 | unsigned long total; |
| 31 | unsigned long maxmem; | 31 | unsigned long maxmem; |
| 32 | unsigned long memlimit; | 32 | unsigned long memlimit; |
| 33 | unsigned long objcount[5]; | ||
| 33 | } Memcontrol; | 34 | } Memcontrol; |
| 34 | 35 | ||
| 35 | Memcontrol l_memcontrol; | 36 | extern Memcontrol l_memcontrol; |
| 36 | 37 | ||
| 37 | 38 | ||
| 38 | /* | 39 | /* |
