Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8048086

G1BlockOffsetSharedArray::compute_size() uses wrong alignment to calculate the amount of space to be reserved

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Fix
    • P4
    • 9
    • 8u40, 9
    • hotspot
    • gc
    • windows

    Description

      The BOT for G1 uses vm_page_size() to align the space required for the BOT offset table. This is wrong on Windows, as the reservations need to be aligned according to os::vm_allocation_granularity.

      During development I observed crashes on Windows due to that.

      The suggested fix is

      static size_t compute_size(size_t mem_region_words) {
        size_t number_of_slots = (mem_region_words / N_words);
      - return ReservedSpace::page_align_size_up(number_of_slots);
      + return ReservedSpace::allocation_align_size(number_of_slots);
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tschatzl Thomas Schatzl
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: