MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / lua_mem_init

Function lua_mem_init

lua/sp.c:992–1006  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990}
991
992static void *lua_mem_init()
993{
994 /* We used to start with 1MB - this isn't quite necessary
995 as comdb2_malloc pre-allocation is much smarter now.
996 We also name it "LUA" (uppercase) to differentiate it
997 from those implicitly created per-thread allocators
998 whose names are "lua" (lowercase). Those allocators are
999 mainly used to bootstrap Lua environment. */
1000 void *mspace = comdb2ma_create(0, 0, "LUA", COMDB2MA_MT_UNSAFE);
1001 if (mspace == NULL) {
1002 logmsg(LOGMSG_FATAL, "%s: comdb2ma_create failed\n", __func__);
1003 exit(1);
1004 }
1005 return mspace;
1006}
1007
1008static void free_tmptbl(SP sp, tmptbl_info_t *tbl)
1009{

Callers 1

create_sp_intFunction · 0.85

Calls 2

exitFunction · 0.85
logmsgFunction · 0.50

Tested by

no test coverage detected