luaL_newstate vs lua_newstate

  • From: Stefan Hett <stefan@xxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 22 Aug 2012 15:52:25 +0200

Hi,

from the installation documentation I understand that in general it's suggested to prefer using luaL_newstate instead of lua_newstate due to the later will make use of the default (slower) memory allocator. Would things be different if one makes use of a customized allocator already (i.e. specify that other allocator as the first parameter to lua_newstate()? If the allocator is as fast as the one provided with LuaJIT are there any other expected pitfalls/problems/downsides of sticking with lua_newstate()?

Regards,
Stefan

Other related posts: