Opened 13 years ago
Closed 13 years ago
#77 closed defect (fixed)
Fix stack size interpretation in CreateThread().
Reported by: | dmik | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.8.4 |
Component: | odin | Version: | 0.8.x |
Severity: | low | Keywords: | |
Cc: |
Description
Currently, the stack size passed to CreateThread() is interpreted as the whole (maximum) stack size. Ноwever under real Windows, according to MSDN, this parameter by default specifies the size of the pre-committed area on top of the stack; the whole stack size is defined by the PE header in this case (1 MB by default). In order to override the header, the STACK_SIZE_PARAM_IS_A_RESERVATION flag must be used, so that the stack size in CreateThread() will define the whole area.
Note:
See TracTickets
for help on using tickets.
See comment 7 in OpenJDK ticket 160.
Basically, the stack size parameter should be interpreted as follows (based on MSDN), where R is the total reserved stack size, C is a portion of it which is initially committed and PE is the stack size specified in the PE header (by default, 1 MB):