-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Abseil is conflict with tcmalloc #42
Comments
I put absl after tcmalloc, and it works, I don't know if there are any hiddlen problem. |
Didn't have a chance to take a look at this today, but I'll investigate tomorrow. Thanks for your patience! |
@tjb1216 - are you using Bazel to build your project? gperftools doesn't provide a Bazel BUILD file, so if you have one that works, I'd like to borrow it rather than spend time reinventing the wheel. |
@ahedberg - You shouldn't need a BUILD file to reproduce this. You can compile gperftools separately and then link against it. Ping me if you need more details. |
Thanks @derekmauro - finally figured out where my built-from-source libtcmalloc.so was hiding. Current theory (assuming use of LD_PRELOAD to use tcmalloc instead of the system malloc):
We think this might have something to do with both Abseil and tcmalloc overriding mmap, but I need to investigate further. |
@derekmauro and I figured out that the extern "C" parts of MallocHook and MallocExtension are in conflict between tcmalloc and absl, as they have the same names. I'm working on a fix. |
Apologies for the silence here. We're still discussing how best to fix this internally. Rest assured we haven't forgotten about this. |
This has been fixed. Please let us know if you're experiencing additional issues using tcmalloc with Abseil. |
If I link abseil and tcmalloc together in my program, It will shutdown and say "Check failed: MallocHook::RemoveNewHook(&InitialNewHook):". But if I use abseil only or tcmalloc only, It will run OK, so I think abseil is conflicted with tcmalloc.
The text was updated successfully, but these errors were encountered: