https://llvm.org/bugs/show_bug.cgi?id=26945
Bug ID: 26945
Summary: std::allocator should use sized-delete
Product: libc++
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
This is the implementation of std::allocator<T>::deallocate from
http://llvm.org/svn/llvm-project/libcxx/trunk/include/memory :
_LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) _NOEXCEPT
{_VSTD::__deallocate((void*)__p);}
This is suboptimal for toolchains that implement an optimized sized-delete
(that is, ::operator delete(void *ptr, size_t s).)
I think this should invoke
_VSTD::__deallocate((void *)__p, size * sizeof(T))
or something similar (with the obvious implementation of sized __deallocate.)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs