src/share/vm/memory/memRegion.cpp

changeset 5103
f9be75d21404
parent 2314
f95d63e2154a
child 5614
9758d9f36299
equal deleted inserted replaced
5101:a9270d9ecb13 5103:f9be75d21404
21 * questions. 21 * questions.
22 * 22 *
23 */ 23 */
24 24
25 #include "precompiled.hpp" 25 #include "precompiled.hpp"
26 #include "memory/allocation.hpp"
27 #include "memory/allocation.inline.hpp"
26 #include "memory/memRegion.hpp" 28 #include "memory/memRegion.hpp"
27 #include "runtime/globals.hpp" 29 #include "runtime/globals.hpp"
28 30
29 // A very simple data structure representing a contigous word-aligned 31 // A very simple data structure representing a contigous word-aligned
30 // region of address space. 32 // region of address space.
97 return MemRegion(); 99 return MemRegion();
98 } 100 }
99 ShouldNotReachHere(); 101 ShouldNotReachHere();
100 return MemRegion(); 102 return MemRegion();
101 } 103 }
104
105 void* MemRegion::operator new(size_t size) {
106 return (address)AllocateHeap(size, mtGC, 0, AllocFailStrategy::RETURN_NULL);
107 }
108
109 void* MemRegion::operator new [](size_t size) {
110 return (address)AllocateHeap(size, mtGC, 0, AllocFailStrategy::RETURN_NULL);
111 }
112 void MemRegion::operator delete(void* p) {
113 FreeHeap(p, mtGC);
114 }
115
116 void MemRegion::operator delete [](void* p) {
117 FreeHeap(p, mtGC);
118 }
119

mercurial