Click here to Skip to main content
15,915,319 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralLevel 4 Warnings... Pin
Nitron18-Oct-02 5:01
Nitron18-Oct-02 5:01 
GeneralRe: Level 4 Warnings... Pin
Shog918-Oct-02 5:31
sitebuilderShog918-Oct-02 5:31 
GeneralRe: Level 4 Warnings... Pin
Nitron18-Oct-02 5:40
Nitron18-Oct-02 5:40 
Generalstack overflow Pin
RalfPeter18-Oct-02 4:26
RalfPeter18-Oct-02 4:26 
GeneralRe: stack overflow Pin
Iain Clarke, Warrior Programmer18-Oct-02 4:51
Iain Clarke, Warrior Programmer18-Oct-02 4:51 
GeneralRe: stack overflow Pin
Nitron18-Oct-02 4:55
Nitron18-Oct-02 4:55 
GeneralRe: stack overflow Pin
Scott H. Settlemier18-Oct-02 18:57
Scott H. Settlemier18-Oct-02 18:57 
GeneralRe: stack overflow Pin
Patje20-Oct-02 21:25
Patje20-Oct-02 21:25 
Normally the stack is guarded by a guard page.
If you call a function and its stack frame doesn't fit within the current stack size anymore, the guard page will be 'touched'. That will generate a page-fault. The logic of the guard page will then increase the stack by one page and put on top another guard page.
If you have a lot of local variables (and the stack frame would be larger than one page), the compiler is responsible for generating code to touch the guard pages until the stack has grown with enough pages.
We noticed in the past that if Fortran is linked in (I think the main had to be written in fortran as well, but I'm not sure) that this logic did not work (the code to touch all the guard pages was missing in the fortran version I think). You don't have fortran in your application, do you ?

Another reason for a stack overflow could be an infinity recursion.

But I agree with Iain, allocating it is much better.

Enjoy life, this is not a rehearsal !!!
QuestionAddString() fails, WHY??? Pin
Wenrich18-Oct-02 4:02
Wenrich18-Oct-02 4:02 
AnswerRe: AddString() fails, WHY??? Pin
Chris Losinger18-Oct-02 4:10
professionalChris Losinger18-Oct-02 4:10 
GeneralRe: AddString() fails, WHY??? Pin
Wenrich18-Oct-02 4:15
Wenrich18-Oct-02 4:15 
AnswerRe: AddString() fails, WHY??? Pin
Carlos Antollini18-Oct-02 4:23
Carlos Antollini18-Oct-02 4:23 
AnswerRe: AddString() fails, WHY??? Pin
RalfPeter18-Oct-02 4:33
RalfPeter18-Oct-02 4:33 
AnswerNO error, the string just NOT added Pin
Wenrich18-Oct-02 4:44
Wenrich18-Oct-02 4:44 
GeneralSerial Port Programming Question Pin
Sens200218-Oct-02 3:57
Sens200218-Oct-02 3:57 
GeneralRe: Serial Port Programming Question Pin
Iain Clarke, Warrior Programmer18-Oct-02 5:22
Iain Clarke, Warrior Programmer18-Oct-02 5:22 
GeneralBitmap save. Pin
int01h18-Oct-02 3:36
int01h18-Oct-02 3:36 
GeneralRe: Bitmap save. Pin
Chris Losinger18-Oct-02 3:38
professionalChris Losinger18-Oct-02 3:38 
GeneralRe: Bitmap save. Pin
int01h18-Oct-02 3:40
int01h18-Oct-02 3:40 
GeneralRe: Bitmap save. Pin
Chris Losinger18-Oct-02 3:44
professionalChris Losinger18-Oct-02 3:44 
GeneralRe: Bitmap save. Pin
int01h18-Oct-02 3:47
int01h18-Oct-02 3:47 
GeneralRe: Bitmap save. Pin
Chris Losinger18-Oct-02 3:56
professionalChris Losinger18-Oct-02 3:56 
GeneralRe: Bitmap save. Pin
int01h18-Oct-02 4:05
int01h18-Oct-02 4:05 
QuestionHow to debug failed module in case of Dr.Watson crash Pin
nutty18-Oct-02 3:31
nutty18-Oct-02 3:31 
GeneralFlashing Button Pin
Ruca18-Oct-02 3:21
Ruca18-Oct-02 3:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.