diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 72cbfbba945..dec3de63a34 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-12-28 Paolo Carlini + + * include/ext/pool_allocator.h (class __pool_alloc): Use + operator new and operator delete. + 2003-12-24 Andrew Pinski * config/cpu/i386/atomicity.h (__exchange_and_add): Fix output diff --git a/libstdc++-v3/include/ext/pool_allocator.h b/libstdc++-v3/include/ext/pool_allocator.h index cb2df02997e..02303de31fd 100644 --- a/libstdc++-v3/include/ext/pool_allocator.h +++ b/libstdc++-v3/include/ext/pool_allocator.h @@ -200,7 +200,7 @@ namespace __gnu_cxx ((_Obj*)(void*)_S_start_free)->_M_free_list_link = *__free_list; *__free_list = (_Obj*)(void*)_S_start_free; } - _S_start_free = new char[__bytes_to_get]; + _S_start_free = static_cast(::operator new(__bytes_to_get)); if (_S_start_free == 0) { size_t __i; @@ -225,7 +225,7 @@ namespace __gnu_cxx } } _S_end_free = 0; // In case of exception. - _S_start_free = new char[__bytes_to_get]; + _S_start_free = static_cast(::operator new(__bytes_to_get)); // This should either throw an exception or remedy the situation. // Thus we assume it succeeded. } @@ -290,7 +290,7 @@ namespace __gnu_cxx } if ((__n > (size_t) _S_max_bytes) || (_S_force_new > 0)) - __ret = new char[__n]; + __ret = ::operator new(__n); else { _Obj* volatile* __free_list = _S_free_list + _S_freelist_index(__n); @@ -317,7 +317,7 @@ namespace __gnu_cxx __pool_alloc<__threads, __inst>::deallocate(void* __p, size_t __n) { if ((__n > (size_t) _S_max_bytes) || (_S_force_new > 0)) - delete [] __p; + ::operator delete(__p); else { _Obj* volatile* __free_list = _S_free_list + _S_freelist_index(__n);