static void verify_scaled_initial(size_t initial_heap_size) {
    MarkSweepPolicy msp;
    msp.initialize_all();

    size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size);
    assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected));
    assert(FLAG_IS_ERGO(NewSize) && NewSize == expected,
        err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize));
  }
예제 #2
0
  static void verify_scaled_young_initial(size_t initial_heap_size) {
    MarkSweepPolicy msp;
    msp.initialize_all();

    if (InitialHeapSize > initial_heap_size) {
      // InitialHeapSize was adapted by msp.initialize_all, e.g. due to alignment
      // caused by 64K page size.
      initial_heap_size = InitialHeapSize;
    }

    size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size);
    assert(msp.initial_young_size() == expected, "%zu != %zu", msp.initial_young_size(), expected);
    assert(FLAG_IS_ERGO(NewSize) && NewSize == expected,
        "NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize);
  }
  static void verify_initial(size_t expected) {
    MarkSweepPolicy msp;
    msp.initialize_all();

    assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected));
  }
  static void verify_min(size_t expected) {
    MarkSweepPolicy msp;
    msp.initialize_all();

    assert(msp.min_gen0_size() <= expected, err_msg("%zu  > %zu", msp.min_gen0_size(), expected));
  }
예제 #5
0
  static void verify_old_initial(size_t expected) {
    MarkSweepPolicy msp;
    msp.initialize_all();

    assert(msp.initial_old_size() == expected, "%zu != %zu", msp.initial_old_size(), expected);
  }
예제 #6
0
  static void verify_old_min(size_t expected) {
    MarkSweepPolicy msp;
    msp.initialize_all();

    assert(msp.min_old_size() <= expected, "%zu  > %zu", msp.min_old_size(), expected);
  }