On Thu, Apr 13, 2017 at 05:02:54PM +0200, Willy Tarreau wrote: > On Thu, Apr 13, 2017 at 12:37:19PM +0200, Thierry Fournier wrote: > > Good catch. I read the code of the Lua function luaL_newstate, and I > > approve your change because this function dos exactly the same job, but > > with a libc memory allocator. Note that a few lines after after your patch > > (about 15 lines), I call the function "lua_setallocf()" which set again > > the memory allocator. I think that this line becomes useless and it will > > be better to remove it. > > Yes it's after I noticed it that I started to understand the problem. But > it's unsure to me whether we can get rid of it, as I understood that the > first one stated what allocator to use during that call. You may be right, > it probably doesn't make much sense. I can test however, it's easy.
OK I could confirm that you're right so I removed this call and merged the change now. thanks! Willy