<div dir="ltr">Hi,<div class="gmail_signature"><div dir="ltr"></div></div>
<div>I'm trying to get the stat for total allocated memory.</div><div><br></div><div>i'm calling either:<br><div><div><font face="monospace, monospace"> size_t um;</font></div><div><font face="monospace, monospace"> size_t sz = sizeof(size_t);<br></font></div></div><div><font face="monospace, monospace"> res = je_mallctl("stats.allocated", &um, &sz, NULL, 0);</font></div></div><div>or </div><div><div><font face="monospace, monospace"> size_t allocated_mib[2];</font></div><div><font face="monospace, monospace"> size_t allocated_mib_len = 0;</font></div><div><font face="monospace, monospace"> allocated_mib_len = sizeof(allocated_mib);<br></font></div><div><font face="monospace, monospace"> int res = je_mallctlnametomib("stats.allocated", allocated_mib, &allocated_mib_len);</font></div></div><div><font face="monospace, monospace"> int res = je_mallctlbymib(allocated_mib, allocated_mib_len, &um, &sz, NULL, 0);</font><br></div><div>both return success (0), but 'um' variable is always set to 0.</div><div><br></div><div>digging into the source code of jemalloc, it seems that ctl_refresh() which is suppose to update this stat is never called.</div><div>p.s. config_stats is set to true, and i confirmed that with a debugger.<br></div><div><br></div><div>is it a bug? or am i missing something?</div><div>thanks.</div><div> Oran.</div></div>