[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: lua_Alloc thread safety
- From: Rena <hyperhacker@...>
- Date: Sun, 23 Mar 2014 18:22:47 -0400
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?
If not, would it be safe to call the allocator without calling lua_getallocf() in the same circumstance, having saved it when creating the Lua state?