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

Remove old_size param from ResizeableResourceHashtable::resize()

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 21
    • 21
    • hotspot
    • b13

    Description

      https://github.com/openjdk/jdk/blob/adcfd257358fcd810f75d41bda7b916595e5dcdf/src/hotspot/share/utilities/resizeableResourceHash.hpp#L108

        void resize(unsigned old_size, unsigned new_size) {
          Node** old_table = BASE::_table;
          Node** new_table = BASE::alloc_table(new_size);

          Node* const* bucket = old_table;
          while (bucket < &old_table[old_size]) {

      But old_size is already stored inside BASE::table_size(). The old_size parameter should be removed to avoid confusion and potential error.

      Attachments

        Issue Links

          Activity

            People

              azafari Afshin Zafari
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: