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

MallocExtension::GetStats() is not implemented #692

Open
GoogleCodeExporter opened this issue Jul 4, 2015 · 1 comment
Open

MallocExtension::GetStats() is not implemented #692

GoogleCodeExporter opened this issue Jul 4, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 30 May 2015 at 3:03

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

No branches or pull requests

1 participant