src/share/vm/memory/memRegion.hpp

changeset 5614
9758d9f36299
parent 5103
f9be75d21404
child 6876
710a3c8b516e
equal deleted inserted replaced
5613:cef1e56a4d88 5614:9758d9f36299
1 /* 1 /*
2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
92 92
93 size_t byte_size() const { return _word_size * sizeof(HeapWord); } 93 size_t byte_size() const { return _word_size * sizeof(HeapWord); }
94 size_t word_size() const { return _word_size; } 94 size_t word_size() const { return _word_size; }
95 95
96 bool is_empty() const { return word_size() == 0; } 96 bool is_empty() const { return word_size() == 0; }
97 void* operator new(size_t size); 97 void* operator new(size_t size) throw();
98 void* operator new [](size_t size); 98 void* operator new [](size_t size) throw();
99 void operator delete(void* p); 99 void operator delete(void* p);
100 void operator delete [](void* p); 100 void operator delete [](void* p);
101 }; 101 };
102 102
103 // For iteration over MemRegion's. 103 // For iteration over MemRegion's.
109 109
110 // A ResourceObj version of MemRegionClosure 110 // A ResourceObj version of MemRegionClosure
111 111
112 class MemRegionClosureRO: public MemRegionClosure { 112 class MemRegionClosureRO: public MemRegionClosure {
113 public: 113 public:
114 void* operator new(size_t size, ResourceObj::allocation_type type, MEMFLAGS flags) { 114 void* operator new(size_t size, ResourceObj::allocation_type type, MEMFLAGS flags) throw() {
115 return ResourceObj::operator new(size, type, flags); 115 return ResourceObj::operator new(size, type, flags);
116 } 116 }
117 void* operator new(size_t size, Arena *arena) { 117 void* operator new(size_t size, Arena *arena) throw() {
118 return ResourceObj::operator new(size, arena); 118 return ResourceObj::operator new(size, arena);
119 } 119 }
120 void* operator new(size_t size) { 120 void* operator new(size_t size) throw() {
121 return ResourceObj::operator new(size); 121 return ResourceObj::operator new(size);
122 } 122 }
123 123
124 void operator delete(void* p) {} // nothing to do 124 void operator delete(void* p) {} // nothing to do
125 }; 125 };

mercurial