< prev index next >
src/share/vm/gc_implementation/g1/g1HotCardCache.cpp
Print this page
rev 7854 : [mq]: 8058446-use-arrayallocator-for-hcc
*** 35,45 ****
void G1HotCardCache::initialize(G1RegionToSpaceMapper* card_counts_storage) {
if (default_use_cache()) {
_use_cache = true;
_hot_cache_size = (size_t)1 << G1ConcRSLogCacheSize;
! _hot_cache = NEW_C_HEAP_ARRAY(jbyte*, _hot_cache_size, mtGC);
reset_hot_cache_internal();
// For refining the cards in the hot cache in parallel
_hot_cache_par_chunk_size = ClaimChunkSize;
--- 35,45 ----
void G1HotCardCache::initialize(G1RegionToSpaceMapper* card_counts_storage) {
if (default_use_cache()) {
_use_cache = true;
_hot_cache_size = (size_t)1 << G1ConcRSLogCacheSize;
! _hot_cache = _hot_cache_memory.allocate(_hot_cache_size);
reset_hot_cache_internal();
// For refining the cards in the hot cache in parallel
_hot_cache_par_chunk_size = ClaimChunkSize;
*** 50,60 ****
}
G1HotCardCache::~G1HotCardCache() {
if (default_use_cache()) {
assert(_hot_cache != NULL, "Logic");
! FREE_C_HEAP_ARRAY(jbyte*, _hot_cache);
}
}
jbyte* G1HotCardCache::insert(jbyte* card_ptr) {
uint count = _card_counts.add_card_count(card_ptr);
--- 50,61 ----
}
G1HotCardCache::~G1HotCardCache() {
if (default_use_cache()) {
assert(_hot_cache != NULL, "Logic");
! _hot_cache_memory.free();
! _hot_cache = NULL;
}
}
jbyte* G1HotCardCache::insert(jbyte* card_ptr) {
uint count = _card_counts.add_card_count(card_ptr);
< prev index next >