From 8d6500fe389624be422ee546f71a1efd4456eabe Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Sun, 25 Nov 2018 12:45:11 +0100 Subject: protect_allocator configure option is gone, long live allocator (more embedders-friendly) --- docs/index.html | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'docs') diff --git a/docs/index.html b/docs/index.html index 723766d..460a786 100644 --- a/docs/index.html +++ b/docs/index.html @@ -324,11 +324,36 @@ nil/false/true + REPLACED BY allocator="protected" AS OF VERSION v3.13.0. (Since v3.5.2) If equal to true, Lanes wraps all calls to the state's allocator function inside a mutex. Since v3.6.3, when left unset, Lanes attempts to autodetect this value for LuaJIT (the guess might be wrong if "ffi" isn't loaded though). Default is true when Lanes detects it is run by LuaJIT, else nil. + + + .allocator + + + nil/"protected"/function + + + (Since v3.13.0)
+ If nil, Lua states are created with luaL_newstate() and use the default allocator.
+ If "protected", The default allocator obtained from lua_getallocf() in the state that initializes Lanes is wrapped inside a critical section and used in all newly created states.
+ If a function, this function is called prior to creating the state. It should return a full userdata containing the following structure: + + + + +
+
	struct { lua_Alloc allocF; void* allocUD;}
+
+ The contents will be used to create the state with lua_newstate( allocF, allocUD). + This option is mostly useful for embedders that want to provide different allocators to each lane, for example to have each one work in a different memory pool thus preventing the need for the allocator itself to be threadsafe. + + + .demote_full_userdata -- cgit v1.2.3-55-g6feb