mirror of
https://github.com/gperftools/gperftools
synced 2025-02-20 14:16:51 +00:00
issue-559: don't setup fork handler in InitStaticVars
Because on OSX it calls malloc which leads to deadlock. Given that we don't really need that fork handler _that_ early, it's fine to change it to normal static initializer git-svn-id: http://gperftools.googlecode.com/svn/trunk@235 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
This commit is contained in:
parent
c583a5babb
commit
805a660193
@ -36,6 +36,7 @@
|
||||
#include "internal_logging.h" // for CHECK_CONDITION
|
||||
#include "common.h"
|
||||
#include "sampler.h" // for Sampler
|
||||
#include "base/googleinit.h"
|
||||
|
||||
namespace tcmalloc {
|
||||
|
||||
@ -95,7 +96,6 @@ void Static::InitStaticVars() {
|
||||
for (int i = 0; i < kNumClasses; ++i) {
|
||||
central_cache_[i].Init(i);
|
||||
}
|
||||
SetupAtForkLocksHandler();
|
||||
|
||||
// It's important to have PageHeap allocated, not in static storage,
|
||||
// so that HeapLeakChecker does not consider all the byte patterns stored
|
||||
@ -106,4 +106,6 @@ void Static::InitStaticVars() {
|
||||
Sampler::InitStatics();
|
||||
}
|
||||
|
||||
REGISTER_MODULE_INITIALIZER(tcmalloc_fork_handler, SetupAtForkLocksHandler());
|
||||
|
||||
} // namespace tcmalloc
|
||||
|
Loading…
Reference in New Issue
Block a user