Frequently Asked Questions About the Java HotSpot VM
On Windows, the default thread stack size is read from the binary (java.exe). As of Java SE 6, this value is 320k in the 32-bit VM and 1024k in the 64-bit VM.
So, let’s see it in google!”Cygwin”. Another way to check is with Microsoft’s MSVC “google:”dumpbin” /headers” command.
$ type objdump objdump is hashed (/usr/bin/objdump) $ objdump -p /c/d/Program\ Files/Java/jre1.6.0_07/bin/java.exe | grep stack SizeOfStackReserve 00050000 SizeOfStackCommit 00001000
These values are in hex. So show them in decimal.
$ objdump -p /c/d/Program\ Files/Java/jre1.6.0_07/bin/java.exe | grep stack | cut -f2 | sed 's/^/0x/' | xargs printf "%d %d\n" 327680 4096 $ objdump -p /c/d/Program\ Files/Java/jre1.5.0_16/bin/java.exe | grep stack | cut -f2 | sed 's/^/0x/' | xargs printf "%d %d\n" 262144 4096
So, it’s 256KB in 1.5 and 320KB in 1.6.
Advertisement