-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Consider using tc_free_sized to pass the size of blocks to free for common deallocations. This was introduced for C++14, where the compiler can include the size in delete operations in most cases, and it saves tcmalloc a potentially expensive lookup to figure out where a freed block should go.
References
tcmalloc interface: https://github.com/gperftools/gperftools/blob/master/src/gperftools/tcmalloc.h.in
some background reading: http://expertmiami.blogspot.com/2018/08/about-c14-sized-delete-operator.html