|
However, lua 5.1 (still work in progress) does this with a runtime hook: void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { global_State *g = G(L); lua_assert((osize == 0) == (block == NULL)); block = (*g->realloc)(g->ud, block, osize, nsize); ----------************* [BTW: those codes are spagetti .. :]
*g->realloc is win32's fault. You now know where to send your mailbombs.