std::allocator should use sized delete

Victor via libstdc++ libstdc++@gcc.gnu.org
Fri Jun 7 07:26:00 GMT 2019


On Fri, 7 Jun 2019 09:12:20 +0200 (CEST)
  Marc Glisse <marc.glisse@inria.fr> wrote:
> On Fri, 7 Jun 2019, Victor via libstdc++ wrote:
> 
> What file did you check in what version? It does use the 
>sized version here.
> 
> -- 
> Marc Glisse

/opt/gcc-9.1/include/c++/9.1.0/ext/new_allocator.h

       void
       deallocate(pointer __p, size_type)
       {
#if __cpp_aligned_new
	if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
	  {
	    ::operator delete(__p, 
std::align_val_t(alignof(_Tp)));
	    return;
	  }
#endif
	::operator delete(__p);
       }



More information about the Libstdc++ mailing list