equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2019, 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. |
248 } |
248 } |
249 } |
249 } |
250 #endif // PRODUCT |
250 #endif // PRODUCT |
251 |
251 |
252 G1AllocRegion::G1AllocRegion(const char* name, |
252 G1AllocRegion::G1AllocRegion(const char* name, |
253 bool bot_updates) |
253 bool bot_updates, |
|
254 uint node_index) |
254 : _alloc_region(NULL), |
255 : _alloc_region(NULL), |
255 _count(0), |
256 _count(0), |
256 _used_bytes_before(0), |
257 _used_bytes_before(0), |
257 _bot_updates(bot_updates), |
258 _bot_updates(bot_updates), |
258 _name(name) |
259 _name(name), |
|
260 _node_index(node_index) |
259 { } |
261 { } |
260 |
262 |
261 HeapRegion* MutatorAllocRegion::allocate_new_region(size_t word_size, |
263 HeapRegion* MutatorAllocRegion::allocate_new_region(size_t word_size, |
262 bool force) { |
264 bool force) { |
263 return _g1h->new_mutator_alloc_region(word_size, force); |
265 return _g1h->new_mutator_alloc_region(word_size, force, _node_index); |
264 } |
266 } |
265 |
267 |
266 void MutatorAllocRegion::retire_region(HeapRegion* alloc_region, |
268 void MutatorAllocRegion::retire_region(HeapRegion* alloc_region, |
267 size_t allocated_bytes) { |
269 size_t allocated_bytes) { |
268 _g1h->retire_mutator_alloc_region(alloc_region, allocated_bytes); |
270 _g1h->retire_mutator_alloc_region(alloc_region, allocated_bytes); |