hotspot/src/share/vm/gc/g1/g1BiasedArray.hpp
changeset 31592 43f48e165466
parent 31350 b856c6918480
child 33105 294e48b4f704
equal deleted inserted replaced
31401:1514c0a798d2 31592:43f48e165466
    69   void initialize(HeapWord* bottom, HeapWord* end, size_t target_elem_size_in_bytes, size_t mapping_granularity_in_bytes) {
    69   void initialize(HeapWord* bottom, HeapWord* end, size_t target_elem_size_in_bytes, size_t mapping_granularity_in_bytes) {
    70     assert(mapping_granularity_in_bytes > 0, "just checking");
    70     assert(mapping_granularity_in_bytes > 0, "just checking");
    71     assert(is_power_of_2(mapping_granularity_in_bytes),
    71     assert(is_power_of_2(mapping_granularity_in_bytes),
    72       err_msg("mapping granularity must be power of 2, is %zd", mapping_granularity_in_bytes));
    72       err_msg("mapping granularity must be power of 2, is %zd", mapping_granularity_in_bytes));
    73     assert((uintptr_t)bottom % mapping_granularity_in_bytes == 0,
    73     assert((uintptr_t)bottom % mapping_granularity_in_bytes == 0,
    74       err_msg("bottom mapping area address must be a multiple of mapping granularity %zd, is "PTR_FORMAT,
    74       err_msg("bottom mapping area address must be a multiple of mapping granularity %zd, is  " PTR_FORMAT,
    75         mapping_granularity_in_bytes, p2i(bottom)));
    75         mapping_granularity_in_bytes, p2i(bottom)));
    76     assert((uintptr_t)end % mapping_granularity_in_bytes == 0,
    76     assert((uintptr_t)end % mapping_granularity_in_bytes == 0,
    77       err_msg("end mapping area address must be a multiple of mapping granularity %zd, is "PTR_FORMAT,
    77       err_msg("end mapping area address must be a multiple of mapping granularity %zd, is " PTR_FORMAT,
    78         mapping_granularity_in_bytes, p2i(end)));
    78         mapping_granularity_in_bytes, p2i(end)));
    79     size_t num_target_elems = pointer_delta(end, bottom, mapping_granularity_in_bytes);
    79     size_t num_target_elems = pointer_delta(end, bottom, mapping_granularity_in_bytes);
    80     idx_t bias = (uintptr_t)bottom / mapping_granularity_in_bytes;
    80     idx_t bias = (uintptr_t)bottom / mapping_granularity_in_bytes;
    81     address base = create_new_base_array(num_target_elems, target_elem_size_in_bytes);
    81     address base = create_new_base_array(num_target_elems, target_elem_size_in_bytes);
    82     initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes, log2_intptr(mapping_granularity_in_bytes));
    82     initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes, log2_intptr(mapping_granularity_in_bytes));