[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.4.2 (realloc ?)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 9 Nov 2020 10:59:26 -0300
> With some of my tests, I came across this alert from DrMemory (https://drmemory.org/)
> ~~Dr.M~~ Error #7: POSSIBLE LEAK 1616 direct bytes 0x0000028e94a6b8d0-0x0000028e94a6bf20 + 7442 indirect bytes
> ~~Dr.M~~ # 0 replace_realloc [d:\drmemory_package\common\alloc_replace.c:2669]
> ~~Dr.M~~ # 1 lua5.4.2.dll!l_alloc [C:\dll\Lua\lauxlib.c:995]
> ~~Dr.M~~ # 2 lua5.4.2.dll!luaL_newstate [C:\dll\Lua\lauxlib.c:1038]
> ~~Dr.M~~ # 3 main [C:\dll\Lua\lua.c:625]
>
> I'm surprised that a simple test with very little used memory,
> Lua is already calling realloc!
No surprises here: luaL_newstate calls lua_newstate which allocates
memory for the Lua state using realloc as malloc.