MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaM_malloc_

Function luaM_malloc_

lib/lua/src/lmem.c:201–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199
200
201void *luaM_malloc_ (lua_State *L, size_t size, int tag) {
202 if (size == 0)
203 return NULL; /* that's all */
204 else {
205 global_State *g = G(L);
206 void *newblock = firsttry(g, NULL, tag, size);
207 if (l_unlikely(newblock == NULL)) {
208 newblock = tryagain(L, NULL, tag, size);
209 if (newblock == NULL)
210 luaM_error(L);
211 }
212 g->GCdebt += size;
213 return newblock;
214 }
215}

Callers

nothing calls this directly

Calls 3

firsttryFunction · 0.85
tryagainFunction · 0.85
GFunction · 0.50

Tested by

no test coverage detected