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

Function firsttry

lib/lua/src/lmem.c:69–74  ·  view source on GitHub ↗

** First allocation will fail except when freeing a block (frees never ** fail) and when it cannot try again; this fail will trigger 'tryagain' ** and a full GC cycle at every allocation. */

Source from the content-addressed store, hash-verified

67** and a full GC cycle at every allocation.
68*/
69static void *firsttry (global_State *g, void *block, size_t os, size_t ns) {
70 if (ns > 0 && cantryagain(g))
71 return NULL; /* fail */
72 else /* normal allocation */
73 return callfrealloc(g, block, os, ns);
74}
75#else
76#define firsttry(g,block,os,ns) callfrealloc(g, block, os, ns)
77#endif

Callers 2

luaM_realloc_Function · 0.85
luaM_malloc_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected