[PATCH] D53120: Implement sized deallocation for std::allocator and friends.
Chris Kennelly via Phabricator
reviews at reviews.llvm.org
Thu Oct 11 09:16:20 PDT 2018
ckennelly added inline comments.
================
Comment at: include/new:328
+
+inline _LIBCPP_INLINE_VISIBILITY void __libcpp_deallocate(void* __ptr, size_t __size, size_t __align) {
+ _DeallocateCaller::__do_it(__ptr, __size, __align);
----------------
Should this be specialized for the "don't know" case, rather than passing the size as 0?
For the common case (`std::allocator<T>::deallocate()`), we don't need to pay the cost of the branch.
Repository:
rCXX libc++
https://reviews.llvm.org/D53120
More information about the libcxx-commits
mailing list