diff -r a0b5154f6f6f -r 4ee999c3c007 hotspot/src/share/vm/memory/memRegion.cpp --- a/hotspot/src/share/vm/memory/memRegion.cpp Tue May 14 11:34:30 2013 +0400 +++ b/hotspot/src/share/vm/memory/memRegion.cpp Tue May 14 09:41:12 2013 -0700 @@ -23,6 +23,8 @@ */ #include "precompiled.hpp" +#include "memory/allocation.hpp" +#include "memory/allocation.inline.hpp" #include "memory/memRegion.hpp" #include "runtime/globals.hpp" @@ -99,3 +101,19 @@ ShouldNotReachHere(); return MemRegion(); } + +void* MemRegion::operator new(size_t size) { + return (address)AllocateHeap(size, mtGC, 0, AllocFailStrategy::RETURN_NULL); +} + +void* MemRegion::operator new [](size_t size) { + return (address)AllocateHeap(size, mtGC, 0, AllocFailStrategy::RETURN_NULL); +} +void MemRegion::operator delete(void* p) { + FreeHeap(p, mtGC); +} + +void MemRegion::operator delete [](void* p) { + FreeHeap(p, mtGC); +} +