aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README10
1 files changed, 6 insertions, 4 deletions
diff --git a/README b/README
index 8ff4ef9..705859c 100644
--- a/README
+++ b/README
@@ -123,9 +123,11 @@ LUA_CPATH. If you are not sure how this works, try creating
123======================= 123=======================
124 Note about LuaJIT 124 Note about LuaJIT
125======================= 125=======================
126By default LuaJIT2 provides an non-thread-safe memory allocator to improve performance. 126It looks like LuaJIT makes some assumptions about the usage of its allocator.
127Of course this will break when running several Lua states concurrently. 127Namely, when a Lua state closes, memory allocated from its alloc function might be freed, even if said memory
128Don't forget to initialize Lanes with the 'protect_allocator' option (see documentation) 128isn't actually owned by the state (for example if the allocator was used explicitly after retrieving if with lua_getallocf)
129if you experience random crash issues. 129Therefore it seems to be a bad idea, when creating a new lua_State, to propagate the allocator
130from another state, as closing the first state would invalidate all the memory used by the second one...
131The best is therefore to leave the 'allocator' configuration option unset when running LuaJIT.
130 132
131(end) 133(end)