summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2018-11-25 12:45:11 +0100
committerBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2018-11-25 12:45:11 +0100
commit135883062fe4eacb1a49dc90a535ae0d39349236 (patch)
tree92fc3e1dbe8711f63c9e58f172d6169695421df6
parent09c2339cd63f579b1c8c12db8b0ad8d8246d0626 (diff)
downloadlanes-135883062fe4eacb1a49dc90a535ae0d39349236.tar.gz
lanes-135883062fe4eacb1a49dc90a535ae0d39349236.tar.bz2
lanes-135883062fe4eacb1a49dc90a535ae0d39349236.zip
protect_allocator configure option is gone, long live allocator (more embedders-friendly)
-rw-r--r--index.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/index.html b/index.html
index 723766d..460a786 100644
--- a/index.html
+++ b/index.html
@@ -324,12 +324,37 @@
324 <tt>nil</tt>/<tt>false</tt>/<tt>true</tt> 324 <tt>nil</tt>/<tt>false</tt>/<tt>true</tt>
325 </td> 325 </td>
326 <td> 326 <td>
327 REPLACED BY <tt>allocator="protected"</tt> AS OF VERSION v3.13.0.
327 (Since v3.5.2) If equal to <tt>true</tt>, 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 <tt>"ffi"</tt> isn't loaded though). 328 (Since v3.5.2) If equal to <tt>true</tt>, 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 <tt>"ffi"</tt> isn't loaded though).
328 Default is <tt>true</tt> when Lanes detects it is run by LuaJIT, else <tt>nil</tt>. 329 Default is <tt>true</tt> when Lanes detects it is run by LuaJIT, else <tt>nil</tt>.
329 </td> 330 </td>
330 </tr> 331 </tr>
331 332
332 <tr valign=top> 333 <tr valign=top>
334 <td id="allocator">
335 <code>.allocator</code>
336 </td>
337 <td>
338 <tt>nil</tt>/<tt>"protected"</tt>/function
339 </td>
340 <td>
341 (Since v3.13.0)<br/>
342 If <tt>nil</tt>, Lua states are created with <tt>luaL_newstate()</tt> and use the default allocator.<br/>
343 If <tt>"protected"</tt>, The default allocator obtained from <tt>lua_getallocf()</tt> in the state that initializes Lanes is wrapped inside a critical section and used in all newly created states.<br/>
344 If a <tt>function</tt>, this function is called prior to creating the state. It should return a full userdata containing the following structure:
345 <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%">
346 <tr>
347 <td>
348 <pre> struct { lua_Alloc allocF; void* allocUD;}</pre>
349 </td>
350 </tr>
351 </table>
352 The contents will be used to create the state with <tt>lua_newstate( allocF, allocUD)</tt>.
353 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.
354 </td>
355 </tr>
356
357 <tr valign=top>
333 <td id="demote_full_userdata"> 358 <td id="demote_full_userdata">
334 <code>.demote_full_userdata</code> 359 <code>.demote_full_userdata</code>
335 </td> 360 </td>