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

MAC: Performance improvement using madvise

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 7u4
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      os_x

      Description

      This bug shadows a JIRA bug created for the Mac OS X port at...

      http://java.net/jira/browse/MACOSX_PORT-430

      Here is the description from that bug:

      Ia simple performance improvement.

      os_bsd.cpp has:
      static int anon_munmap(char * addr, size_t size) { return ::munmap(addr, size) == 0; }
      before the ::munmap() we should add:
      int ret = madvise(addr, size, MADV_FREE);
      assert(ret == 0, "os::uncommit_memory: madvise failed");

      the meaning of MADV_FREE on mac os is:
      #define MADV_FREE 5 /* pages unneeded, discard contents */
      MADV_FREE Indicates that the application will not need the
      information contained in this address range, so the
      pages may be reused right away. The address range
      will remain valid. This is used with madvise()
      system call.

      The main difficulty of adding this is to figure out which os variations support madvise and to introduce any necessary conditional compilation.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmelvin James Melvin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: