added 'allocate' and 'free' to Lua