11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 #include "precompiled.hpp"
27 #include "gc_implementation/shared/mutableNUMASpace.hpp"
28 #include "gc_implementation/shared/spaceDecorator.hpp"
29 #include "memory/sharedHeap.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "runtime/thread.inline.hpp"
32
33 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
34
35 MutableNUMASpace::MutableNUMASpace(size_t alignment) : MutableSpace(alignment) {
36 _lgrp_spaces = new (ResourceObj::C_HEAP, mtGC) GrowableArray<LGRPSpace*>(0, true);
37 _page_size = os::vm_page_size();
38 _adaptation_cycles = 0;
39 _samples_count = 0;
40 update_layout(true);
41 }
42
43 MutableNUMASpace::~MutableNUMASpace() {
44 for (int i = 0; i < lgrp_spaces()->length(); i++) {
45 delete lgrp_spaces()->at(i);
46 }
47 delete lgrp_spaces();
48 }
49
50 #ifndef PRODUCT
|
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 #include "precompiled.hpp"
27 #include "gc_implementation/shared/mutableNUMASpace.hpp"
28 #include "gc_implementation/shared/spaceDecorator.hpp"
29 #include "memory/sharedHeap.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "runtime/atomic.inline.hpp"
32 #include "runtime/thread.inline.hpp"
33
34 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
35
36 MutableNUMASpace::MutableNUMASpace(size_t alignment) : MutableSpace(alignment) {
37 _lgrp_spaces = new (ResourceObj::C_HEAP, mtGC) GrowableArray<LGRPSpace*>(0, true);
38 _page_size = os::vm_page_size();
39 _adaptation_cycles = 0;
40 _samples_count = 0;
41 update_layout(true);
42 }
43
44 MutableNUMASpace::~MutableNUMASpace() {
45 for (int i = 0; i < lgrp_spaces()->length(); i++) {
46 delete lgrp_spaces()->at(i);
47 }
48 delete lgrp_spaces();
49 }
50
51 #ifndef PRODUCT
|