HushengGen / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Any plan to shift to CMake? #677

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Spent yesterday hacking TCMalloc into our SWIG'd C++ Java libraries. Saw a 
whopping 20x performance increase for an 8 thread test case. The large 
performance increase is because we force all C++ memory allocations to allocate 
memory from the Java heap to adhere to the -Xmx JVM flag. 

Unfortunately, the work isn't very portable to Windows since TCMalloc's 
automake build system isn't compatible with our CMake build system. I ended up 
following the Chromium project's lead and simply copied in the necessary 
config.h and tcmalloc.h headers to get it to work. 

Is there any plan, or does anyone know of a CMakeLists.txt that works for 
TCMalloc? Rather not re-invent the wheel. 

Also, would TCMalloc be interested in a configuration mode that uses the JVM as 
a SysAllocator?

Original issue reported on code.google.com by col...@gmail.com on 19 Mar 2015 at 4:18

GoogleCodeExporter commented 9 years ago
I don't have any plans to switch to CMake. Some _additional_ lightweight 
tcmalloc-minimal-only cmakefile might be useful thing to contribute though.

Regarding SysAllocator implementation works with JVM I think it's best to keep 
it separate from tcmalloc. I.e. it's very niche thing which we won't be able to 
maintain in meaningful way.

Original comment by alkondratenko on 21 Mar 2015 at 6:45