[llvm-bugs] [Bug 26945] New: std::allocator should use sized-delete
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 14 16:05:18 PDT 2016
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: unassignedclangbugs at nondot.org
Reporter: ahh at google.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160314/251c4587/attachment.html>
More information about the llvm-bugs
mailing list