hotspot/src/share/vm/gc/g1/g1FromCardCache.cpp
changeset 46669 05296a16012a
parent 37228 25ea8814a824
equal deleted inserted replaced
46668:f5a564180f37 46669:05296a16012a
    29 #include "utilities/debug.hpp"
    29 #include "utilities/debug.hpp"
    30 
    30 
    31 int**  G1FromCardCache::_cache = NULL;
    31 int**  G1FromCardCache::_cache = NULL;
    32 uint   G1FromCardCache::_max_regions = 0;
    32 uint   G1FromCardCache::_max_regions = 0;
    33 size_t G1FromCardCache::_static_mem_size = 0;
    33 size_t G1FromCardCache::_static_mem_size = 0;
       
    34 #ifdef ASSERT
       
    35 uint   G1FromCardCache::_max_workers = 0;
       
    36 #endif
    34 
    37 
    35 void G1FromCardCache::initialize(uint num_par_rem_sets, uint max_num_regions) {
    38 void G1FromCardCache::initialize(uint num_par_rem_sets, uint max_num_regions) {
    36   guarantee(max_num_regions > 0, "Heap size must be valid");
    39   guarantee(max_num_regions > 0, "Heap size must be valid");
    37   guarantee(_cache == NULL, "Should not call this multiple times");
    40   guarantee(_cache == NULL, "Should not call this multiple times");
    38 
    41 
    39   _max_regions = max_num_regions;
    42   _max_regions = max_num_regions;
       
    43 #ifdef ASSERT
       
    44   _max_workers = num_par_rem_sets;
       
    45 #endif
    40   _cache = Padded2DArray<int, mtGC>::create_unfreeable(_max_regions,
    46   _cache = Padded2DArray<int, mtGC>::create_unfreeable(_max_regions,
    41                                                        num_par_rem_sets,
    47                                                        num_par_rem_sets,
    42                                                        &_static_mem_size);
    48                                                        &_static_mem_size);
    43 
    49 
    44   invalidate(0, _max_regions);
    50   invalidate(0, _max_regions);