File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ pub(crate) static EXTRA_REGISTRY_KEY: u8 = 0;
226
226
227
227
const WRAPPED_FAILURE_POOL_SIZE : usize = 64 ;
228
228
const MULTIVALUE_POOL_SIZE : usize = 64 ;
229
+ const REF_STACK_RESERVE : c_int = 1 ;
229
230
230
231
/// Requires `feature = "send"`
231
232
#[ cfg( feature = "send" ) ]
@@ -519,8 +520,8 @@ impl Lua {
519
520
#[ cfg( feature = "module" ) ]
520
521
skip_memory_check : false ,
521
522
ref_thread,
522
- // We need 1 extra stack space to move values in and out of the ref stack.
523
- ref_stack_size : ffi:: LUA_MINSTACK - 1 ,
523
+ // We need some reserved stack space to move values in and out of the ref stack.
524
+ ref_stack_size : ffi:: LUA_MINSTACK - REF_STACK_RESERVE ,
524
525
ref_stack_top : ffi:: lua_gettop ( ref_thread) ,
525
526
ref_free : Vec :: new ( ) ,
526
527
wrapped_failure_pool : Vec :: with_capacity ( WRAPPED_FAILURE_POOL_SIZE ) ,
You can’t perform that action at this time.
0 commit comments