473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How do i increase the size of the program stack?

I am using Visual C++ 6 IDE,with 512MB RAM. I have coded a recursive
function that has a correct end condition for recursion. There is no
infinite recursion.

For some input data,the recursive function gets called so many times
that it causes a 'First-chance exception in a.exe: 0xC00000FD: Stack
Overflow.'

How do i increase the size of the program stack?
Mar 22 '08 #1
4 4041
<li************@gmail.comwrote in message
news:27**********************************@u10g2000 prn.googlegroups.com...
:I am using Visual C++ 6 IDE,with 512MB RAM. I have coded a recursive
: function that has a correct end condition for recursion. There is no
: infinite recursion.
:
: For some input data,the recursive function gets called so many times
: that it causes a 'First-chance exception in a.exe: 0xC00000FD: Stack
: Overflow.'
:
: How do i increase the size of the program stack?

As already stated, stack size probably can be configured as
a parameter to your linker.

But I would like to add that, in production code, I usually avoid
poorly bounded recursion (in practice, everything that may recurse
for more than log(input size) .
Even if there cannot be infinite recursion, it is not a good sign
that you are hitting the default stack size limit of your platform.

Maybe recursion depth can be reduced by altering or tuning the
algorithm. If not, derecursifying the algorithm is advisable...

Regards -Ivan
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form
Brainbench MVP for C++ <http://www.brainbench.com

Mar 22 '08 #2
On Sat, 22 Mar 2008 05:08:09 -0700, lianne.ribeiro wrote:

(...)
How do i increase the size of the program stack?
Do not multi-post. Your question was answered in comp.lang.c

- Anand

--
ROT-13 email address to reply
Mar 22 '08 #3
In article <27a2f808-4e64-4a9d-a69a-3a86b54279f2
@u10g2000prn.googlegroups.com>, li************@gmail.com says...
I am using Visual C++ 6 IDE,with 512MB RAM. I have coded a recursive
function that has a correct end condition for recursion. There is no
infinite recursion.

For some input data,the recursive function gets called so many times
that it causes a 'First-chance exception in a.exe: 0xC00000FD: Stack
Overflow.'

How do i increase the size of the program stack?
You might want to ask somewhere that this would be topical, such as
comp.os.ms-windows.programmer.win32. When you do, I'd advise adding one
more crucial bit of data: whether that exception is followed almost
immediately by a _second_ chance exception of the same type.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Mar 23 '08 #4
On Sat, 22 Mar 2008 21:06:06 -0600, Jerry Coffin wrote:
In article <27a2f808-4e64-4a9d-a69a-3a86b54279f2
@u10g2000prn.googlegroups.com>, li************@gmail.com says...
(..)
>>
How do i increase the size of the program stack?

You might want to ask somewhere that this would be topical, such as
comp.os.ms-windows.programmer.win32. When you do, I'd advise adding one
more crucial bit of data: whether that exception is followed almost
immediately by a _second_ chance exception of the same type.
This is a multi-post, and despite being OT, the OP got an answer in
c.l.c.

- Anand

--
ROT-13 email address to reply
Mar 23 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dba_udb | last post by:
We need to increase the space of DB2 catalog on OS/390. As these are user managed, I feel we may need to take an outage to increase the space. Is there a way to avoid outage? Is ONLINE REORG...
18
by: Peteroid | last post by:
Apparently there is a limit to how complex a single header file with a huge class definition in it can be. The source to one of my header files is at a point that it compiles and runs fine, until I...
2
by: yoshitha | last post by:
Hi Can any one tell me how to increase size of an array in C#.net with ASP.Net? its very urgent for me thanks yoshitha
5
by: Vinutha | last post by:
I have created one webpage for our website. but when i view that page in a wide screen monitor, the page is alligning left. ie. right part of the screen its giving blank. how to justify the...
2
by: Tom Lee | last post by:
hello. i use commonDialogBox in visual basic 6.0 for open file but the contol has short size file browsing box and i want to increase the size or add horizental scroll bar How can i do this? ...
4
by: lianne.ribeiro | last post by:
I am using Visual C++ 6 IDE,with 512MB RAM. I have coded a recursive function that has a correct end condition for recursion. There is no infinite recursion. For some input data,the recursive...
9
by: raashid bhatt | last post by:
does having more variables increases the size of program.
1
by: nagmvs | last post by:
Hello I am unable to upload More than 200kb in to my server and also i can downlaod only less than 4MB file from my server .When i am searching in internet i found solution as u can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.