| 990 | } |
| 991 | |
| 992 | static 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 | |
| 1008 | static void free_tmptbl(SP sp, tmptbl_info_t *tbl) |
| 1009 | { |
no test coverage detected