Cygwin tells you Windows java.exe default thread stack size

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 Cygwin. Another way to check is with Microsoft's MSVC "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.
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today