google / tcmalloc

Apache License 2.0
4.31k stars 463 forks source link

Use more memory than default c++ #236

Closed xiaohunqupo closed 1 month ago

xiaohunqupo commented 3 months ago

In my project, test result like this tcmalloc Release/Debug work1 Memory CommitSize Work2 Memory CommitSize N D 28s 409MB 935MB 1m20s 3581MB 5211MB Y D 23s 475MB 1053MB 1m11s 4083MB 5653MB N R 18S 416MB 967MB 22s 3652MB 5295MB Y R 18S 506MB 1049MB 20s 4140MB 5650MB

ckennelly commented 1 month ago

TCMalloc caches memory to improve CPU performance. This may not always be optimal for all environments, especially memory-constrained ones.