-
Enhancement
-
Resolution: Fixed
-
P3
-
7
-
b25
-
generic
-
generic, windows
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8164877 | OpenJDK6 | Andrew Hughes | P3 | Resolved | Fixed | b40 |
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.
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.
- backported by
-
JDK-8164877 Avoid hardcoded cygwin paths for memory detection
-
- Resolved
-
- duplicates
-
JDK-6611834 "Unknown HZ value! (500) Assume 100" msgs from j2se builds on some Windows machines
-
- Closed
-
-
JDK-6665700 MB_OF_MEMORY calculation is incorrect for Windows
-
- Closed
-