ctl_refresh() is never called, je_mallctl("stats.allocated") doesn't work
Oran Agra
oran at redislabs.com
Wed Dec 24 01:33:40 PST 2014
Hi,
I'm trying to get the stat for total allocated memory.
i'm calling either:
size_t um;
size_t sz = sizeof(size_t);
res = je_mallctl("stats.allocated", &um, &sz, NULL, 0);
or
size_t allocated_mib[2];
size_t allocated_mib_len = 0;
allocated_mib_len = sizeof(allocated_mib);
int res = je_mallctlnametomib("stats.allocated", allocated_mib,
&allocated_mib_len);
int res = je_mallctlbymib(allocated_mib, allocated_mib_len, &um, &sz,
NULL, 0);
both return success (0), but 'um' variable is always set to 0.
digging into the source code of jemalloc, it seems that ctl_refresh() which
is suppose to update this stat is never called.
p.s. config_stats is set to true, and i confirmed that with a debugger.
is it a bug? or am i missing something?
thanks.
Oran.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20141224/016aa639/attachment.html>
More information about the jemalloc-discuss
mailing list