pool_allocator.h (class __pool_alloc): Use operator new and operator delete.
authorPaolo Carlini <pcarlini@suse.de>
Sun, 28 Dec 2003 12:13:15 +0000 (12:13 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 28 Dec 2003 12:13:15 +0000 (12:13 +0000)
2003-12-28  Paolo Carlini  <pcarlini@suse.de>

* include/ext/pool_allocator.h (class __pool_alloc): Use
operator new and operator delete.

From-SVN: r75181

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/pool_allocator.h

index 72cbfbba94547ab3f17c81158485f39d7bf21396..dec3de63a34bce6a28067b858cde70e1d4101b65 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-28  Paolo Carlini  <pcarlini@suse.de>
+
+       * include/ext/pool_allocator.h (class __pool_alloc): Use
+       operator new and operator delete.
+
 2003-12-24  Andrew Pinski  <pinskia@physics.uc.edu>
 
        * config/cpu/i386/atomicity.h (__exchange_and_add): Fix output 
index cb2df02997e3f862d43c5fdbf0768f291c662304..02303de31fd73164d7acfa09ff3d5d27a724c2ff 100644 (file)
@@ -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<char*>(::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<char*>(::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);