diff --git a/cpp11/zone.hpp b/cpp11/zone.hpp index a152ae87..9a99e650 100644 --- a/cpp11/zone.hpp +++ b/cpp11/zone.hpp @@ -168,6 +168,24 @@ public: void swap(zone& o); + static void* operator new(std::size_t size) throw(std::bad_alloc) + { + void* p = ::malloc(size); + if (!p) throw std::bad_alloc(); + return p; + } + static void operator delete(void *p) throw() + { + ::free(p); + } + static void* operator new(std::size_t size, void* mem) throw() + { + return mem; + } + static void operator delete(void *p, void* mem) throw() + { + } + template T* allocate(Args... args);