< prev index next >
src/share/vm/gc/g1/heapRegionManager.cpp
Print this page
rev 11970 : imported patch heap_region_manager_volatiles
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -479,12 +479,13 @@
#endif // PRODUCT
HeapRegionClaimer::HeapRegionClaimer(uint n_workers) :
_n_workers(n_workers), _n_regions(G1CollectedHeap::heap()->_hrm._allocated_heapregions_length), _claims(NULL) {
assert(n_workers > 0, "Need at least one worker.");
- _claims = NEW_C_HEAP_ARRAY(uint, _n_regions, mtGC);
- memset(_claims, Unclaimed, sizeof(*_claims) * _n_regions);
+ uint* new_claims = NEW_C_HEAP_ARRAY(uint, _n_regions, mtGC);
+ memset(new_claims, Unclaimed, sizeof(*_claims) * _n_regions);
+ _claims = new_claims;
}
HeapRegionClaimer::~HeapRegionClaimer() {
if (_claims != NULL) {
FREE_C_HEAP_ARRAY(uint, _claims);
< prev index next >