MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / firsttry

Function firsttry

3rd/lua-5.4.3/src/lmem.c:31–36  ·  view source on GitHub ↗

** First allocation will fail whenever not building initial state. ** (This fail will trigger 'tryagain' and a full GC cycle at every ** allocation.) */

Source from the content-addressed store, hash-verified

29** allocation.)
30*/
31static void *firsttry (global_State *g, void *block, size_t os, size_t ns) {
32 if (completestate(g) && ns > 0) /* frees never fail */
33 return NULL; /* fail */
34 else /* normal allocation */
35 return (*g->frealloc)(g->ud, block, os, ns);
36}
37#else
38#define firsttry(g,block,os,ns) ((*g->frealloc)(g->ud, block, os, ns))
39#endif

Callers 2

luaM_realloc_Function · 0.85
luaM_malloc_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected