3 ms·
The C++ delete[] operator doesn't take a size parameter either. This is neither here nor there, and unrelated to the problem the blog post is talking about.
by charles-salvia 10y ago
The C++ delete[] operator doesn't take a size parameter either. This is neither here nor there, and unrelated to the problem the blog post is talking about.
- tarbism 10y agoC++ operator delete has 25 overloads and many of them take a size. http://en.cppreference.com/w/cpp/memory/new/operator_delete http://en.cppreference.com/w/cpp/memory/new/operator_delete
- nly 10y ago> The C++ delete[] operator doesn't take a size parameter either Yes it does. See overload 6 here http://en.cppreference.com/w/cpp/memory/new/operator_delete http://en.cppreference.com/w/cpp/memory/new/operator_delete
- theclaw 10y agoNote that the size parameter is ignored by the standard library implementation. It is intended for use by user-defined implementations.
- nly 10y ago> Note that the size parameter is ignored by the standard library implementation Only because they all call malloc() and free() under the covers. It was however an ABI break, and one the C++ community thought worth doing. If you replace your malloc with jemalloc you can easily wire this up to sdallocx(). The C++ standard library obviously can't do this out of the box because it can't assume you are using jemalloc