Fixed delete free mismatch problem in C++11 version.

This commit is contained in:
Takatoshi Kondo 2014-03-15 17:37:20 +00:00
parent 3b7a2f8f32
commit a951ea90b8

View File

@ -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 <typename T, typename... Args>
T* allocate(Args... args);