0 out of 4 rated this helpful - Rate this topic

_chkstk Routine

Called by the compiler when you have more than one page of local variables in your function.

Remarks

_chkstk Routine is a helper routine for the C compiler. For x86 compilers, _chkstk Routine is called when the local variables exceed 4K bytes; for x64 compilers it is 8K.

 

 

Build date: 4/6/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
More information
See also KB100775: Description of the stack checking for Windows NT-based applications: http://support.microsoft.com/kb/100775
Annoying Little Thing
What I can't understand is why I can't create a variable on the stack with more than 4KB bytes. Besides, if that's the case, why doesn't the compiler warns me before hand that the code will fail?
Clarification requried
In the last sentence under remarks, the article says:

"..; for x64 compilers it is 4K and 8K respectively."

Respecively to what? 4k is 4096 - so why the difference?

Does the remark mean that fo X86 compilers, the routine is called when local variables exceed 4k (4096 bytes) while for X64 compilers when they exceed 8k (8192 bytes)? Or something else?

Re J2innet's comment
Care to clarify what you mean?
out of the blue, this routine causes some pain in the ***
out of the blue, this routine causes some pain in the ***