Hacker News new | past | comments | ask | show | jobs | submit login

Technically if you use jemalloc, which most everyone should do anyway, it comes with built-in instrumentation but you need to enable it compile time and generally not many are aware of this.



I work on many C/C++ projects and none of them use jemalloc. I also use several databases written in C, or C++, and none of them use jemalloc either.

I do however wish Mongo offered the option: https://jira.mongodb.org/browse/SERVER-39325


ClickHouse uses jemalloc as the only option: https://github.com/ClickHouse/ClickHouse/

We have contributed patches and bugfixes to jemalloc as well.


I'd expect nothing less for clickhouse :)


I think tcmalloc will output protos too now which google pprof tool understands. If you’re using standard glibc malloc you’re probably leaving a lot of performance on the table


Performance wise it doesn't matter for most projects like games where allocations aren't done in hot paths anyway.

Problem with tcmalloc is fragmentation. Luckily I can then on aggressive decommit in some scenarios and that helps.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: