diff options
author | Mike Pall <mike> | 2010-02-27 19:53:14 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-02-27 20:18:11 +0100 |
commit | ec78d3177e1b24c24a89f0e83c19eb3e3e0f8023 (patch) | |
tree | 81d6af7daf9c7fa3e973cc3d8d7861a09880b05c /src/lj_state.c | |
parent | 52b7651327b2aec4f12ae47f3ce5b56b1fb55996 (diff) | |
download | luajit-ec78d3177e1b24c24a89f0e83c19eb3e3e0f8023.tar.gz luajit-ec78d3177e1b24c24a89f0e83c19eb3e3e0f8023.tar.bz2 luajit-ec78d3177e1b24c24a89f0e83c19eb3e3e0f8023.zip |
Correctly align and free allocated machine code areas.
Bump default mcode area size to 64K for x64.
Diffstat (limited to '')
-rw-r--r-- | src/lj_state.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_state.c b/src/lj_state.c index e690a5d3..2287efca 100644 --- a/src/lj_state.c +++ b/src/lj_state.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "lj_meta.h" | 18 | #include "lj_meta.h" |
19 | #include "lj_state.h" | 19 | #include "lj_state.h" |
20 | #include "lj_frame.h" | 20 | #include "lj_frame.h" |
21 | #include "lj_mcode.h" | ||
21 | #include "lj_trace.h" | 22 | #include "lj_trace.h" |
22 | #include "lj_dispatch.h" | 23 | #include "lj_dispatch.h" |
23 | #include "lj_vm.h" | 24 | #include "lj_vm.h" |
@@ -143,7 +144,9 @@ static void close_state(lua_State *L) | |||
143 | global_State *g = G(L); | 144 | global_State *g = G(L); |
144 | #ifndef LUAJIT_USE_SYSMALLOC | 145 | #ifndef LUAJIT_USE_SYSMALLOC |
145 | if (g->allocf == lj_alloc_f) { | 146 | if (g->allocf == lj_alloc_f) { |
146 | lj_trace_freestate(g); | 147 | #if LJ_HASJIT |
148 | lj_mcode_free(G2J(g)); | ||
149 | #endif | ||
147 | lj_alloc_destroy(g->allocd); | 150 | lj_alloc_destroy(g->allocd); |
148 | } else | 151 | } else |
149 | #endif | 152 | #endif |