How HEAPSIZE/STACKSIZE Commit > Reserve Affects ExecutionLast reviewed: November 2, 1995Article ID: Q89296 |
The information in this article applies to:
SUMMARYThe syntax for the module-definition statements HEAPSIZE and STACKSIZE is as follows
HEAPSIZE [reserve] [,commit] STACKSIZE [reserve] [,commit]The remarks for HEAPSIZE and STACKSIZE on page 62 of the "Tools User's Guide" manual that comes with the Win32 SDK state the following:
When commit is less than reserve, memory demands are reduced but execution time is slower.By default, commit is less than reserve. The reason that execution time is slower (and it is actually only fractionally slower), is that the system sets up guard pages and could have to process guard page faults.
MORE INFORMATIONIf the committed memory is less than the reserved memory, the system sets up guard page(s) around the heap or stack. When the heap or stack grows big enough, the guard pages start accessing outside the committed area. This causes a guard page fault, which tells the system to map in another page. The application continues to run as if you had originally had the new page committed. If the committed memory is greater than the reserve, no guard pages are created and the program faults if it goes outside the committed memory area. Experimenting with the commit versus reserve numbers may result in a combination that would produce noticeable results, but for most applications, this difference is probably not noticeable. The potential benefits do not warrant significant experimentation.
|
Additional reference words: 3.10 3.50 4.00 95
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |