Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant memory growth #172

Open
sebt3 opened this issue Jan 22, 2017 · 0 comments
Open

Constant memory growth #172

sebt3 opened this issue Jan 22, 2017 · 0 comments

Comments

@sebt3
Copy link

sebt3 commented Jan 22, 2017

Based on the valgrind massif tool, I'm getting this :
->13.06% (3,590,851B) 0x65BB270: luaM_realloc_ (lmem.c:84)
| ->08.34% (2,292,707B) 0x65B9797: luaC_newobj (lgc.c:215)
| | ->04.31% (1,183,539B) 0x65BF6C3: luaS_newlstr (lstring.c:103)
| | | ->04.20% (1,155,555B) 0x65B2540: lua_pushlstring (lapi.c:505)
| | | | ->03.75% (1,030,540B) 0x65C4E6A: luaL_pushresult (lauxlib.c:473)
| | | | | ->03.75% (1,030,540B) 0x65C8C63: read_line (liolib.c:386)
| | | | | ->03.75% (1,030,540B) 0x65C8CD1: g_read (liolib.c:430)
| | | | | ->03.75% (1,030,540B) 0x65C93D3: io_readline (liolib.c:493)
| | | | | ->03.75% (1,030,540B) 0x3C94F4: watcheD::LuaCollector::collect() (luacollectors.cpp:71)
| | ->02.72% (746,944B) 0x65BF7B0: luaS_newlstr (lstring.c:103)
| | | ->01.10% (302,687B) 0x65B2540: lua_pushlstring (lapi.c:505)
... Some time later
->13.11% (3,645,476B) 0x65BB270: luaM_realloc_ (lmem.c:84)
| ->08.42% (2,342,628B) 0x65B9797: luaC_newobj (lgc.c:215)
| | ->04.39% (1,221,577B) 0x65BF6C3: luaS_newlstr (lstring.c:103)
| | | ->04.29% (1,192,648B) 0x65B2540: lua_pushlstring (lapi.c:505)
| | | | ->03.84% (1,067,633B) 0x65C4E6A: luaL_pushresult (lauxlib.c:473)
| | | | | ->03.84% (1,067,633B) 0x65C8C63: read_line (liolib.c:386)
| | | | | ->03.84% (1,067,633B) 0x65C8CD1: g_read (liolib.c:430)
| | | | | ->03.84% (1,067,633B) 0x65C93D3: io_readline (liolib.c:493)
| | | | | ->03.84% (1,067,633B) 0x3C94F4: watcheD::LuaCollector::collect() (luacollectors.cpp:71)
| | ->02.70% (751,563B) 0x65BF7B0: luaS_newlstr (lstring.c:103)
| | | ->01.10% (306,908B) 0x65B2540: lua_pushlstring (lapi.c:505)

All "LuaCollector::collect()" do is calling the same lua function again and a again at regular interval. The lua function should not allocate new memory...
It seams like all new string are attached to a lua table and never freed.

What am I missing? What can I do for this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant