lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 23/03/14 22:22, Rena wrote:
> Would it be safe to do something like:
> void *ud = NULL;
> lua_Alloc alloc = lua_getallocf(L, &ud);
> void *buf = alloc(ud, NULL, 0, newsize);
> while L may be being used by another thread?

I would say that it depends on which allocator and may be which C
runtime is being used. Lua will lock the state when getting the
allocator from the global state if you have implemented lua_lock and


Attachment: signature.asc
Description: OpenPGP digital signature