checkedMalloc/free substitutes that performs sized deallocation
Summary: Sized deallocation makes it faster for jemalloc to locate an allocation's metadata. Accessing this functionality via ::operator delete(void*,size_t) is both portable and a bit more direct than calling sdallocx after a dynamic jemalloc check. This diff adds small functions allocateBytes and deallocateBytes that are replacements for folly::checkedMalloc and free (and should be paired), to localize the #ifdef. Reviewed By: marksantaniello Differential Revision: D10496934 fbshipit-source-id: eb193e1c315ca88286126f5eb68c705301ad5177
Showing
Please register or sign in to comment