tcmalloc-rs
tcmalloc-rs copied to clipboard
A drop-in GlobalAlloc implementation using tcmalloc from gperftools.
https://github.com/jmcomets/tcmalloc-rs/blob/f81f326991738b61014c75163c8b1956c6cdbb33/tcmalloc-sys/build.rs#L6-L7 https://github.com/jmcomets/tcmalloc-rs/blob/f81f326991738b61014c75163c8b1956c6cdbb33/tcmalloc-sys/build.rs#L37-L43 This is unreliable. Check [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules), or consider vendoring the two files that's actually used.
A way to reproduce: ```bash cd examples cargo build --features bundled -vv ``` and then `ldd target/debug/tcmalloc-example`: ```bash linux-vdso.so.1 (0x00007ffe404dd000) libtcmalloc.so.4 => /lib/x86_64-linux-gnu/libtcmalloc.so.4 (0x00007f9600852000) ... ``` and then `readelf -s...
There's an unclear comment [here](https://github.com/jmcomets/tcmalloc-rs/blob/master/src/lib.rs#L9-L10) that doesn't explain why `tc_free_sized` isn't used. The issue is well explained over at https://github.com/gperftools/gperftools/issues/1096#issuecomment-480629732. Summary: - it's less a bug from TCMalloc and more...