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

Avoid hardcoded cygwin paths for memory detection

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: infrastructure
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b25
    • CPU:
      generic
    • OS:
      generic, windows
    • Verification:
      Not verified

      Backports

        Description

        JDK build process relies on information about size of RAM to enable batch processing on Windows.
        However, autodetection process assumes cygwin is present in the c:\cygwin and has free utility installed.
        This is not the case rather often and compilation is performed assuming 512MB RAM size.

        Autodetection logic should support MKS (which has sysinf tool to get memory size) and
        cygwin installations to other directories.
        Perhaps autodetection logic can even use windows utilities (such as mem or systeminfo).
        mem tool is not very accurate and splits available memory into chunks according to DOS rules
        but from further usage of RAM estimate it seems that very accurate measurement is not required.
        The message comes from make/common/shared/Platform.gmk:
          # How much RAM does this machine have:
          MB_OF_MEMORY := $(shell \
            if [ -f "C:/cygwin/bin/free.exe" ] ; then \
              ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
        grep Mem: | \
        sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
            else \
              echo "512"; \
            fi)

        The call to free.exe causes a message such as this on some windows machines
        but not others:
           Unknown HZ value! (500) Assume 100.

        The '500' varies depending on if the make is done under cygwin or MKS.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ohair Kelly Ohair (Inactive)
                  Reporter:
                  igor Igor Nekrestyanov (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: