What steps will reproduce the problem?
Calling
MallocExtension::instance()->GetStats(buffer, buffer_length);
per the documentation just places a null character in buffer, see
malloc_extension.cc:125
void MallocExtension::GetStats(char* buffer, int length) {
assert(length > 0);
buffer[0] = '\0';
}
What is the expected output? What do you see instead?
I expected something resembling the output of
static void DumpStats(TCMalloc_Printer* out, int level)()
What version of the product are you using? On what operating system?
2.4 on OS X
Please provide any additional information below.
I could patch in a call to DumpStats but it's marked static so linking is a
problem. I don't quite understand why it's marked such (other than it's nice
not to muck with the global namespace). I could copy/paste the code around but
that seems messy (likely the local change I'll make).
If I understand the intent and the design issues I should be aware of I'm happy
to patch it up.
Original issue reported on code.google.com by
m...@conlen.orgon 30 May 2015 at 3:03