473,406 Members | 2,769 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.

Stack size setting in VS.net

My program causes StackOverflow because it makes many recursive calls due to
the program's nature (not a bug!).
I would like to know if there is any settings in the compiler or VS.NET IDE
so that I can increase the stack size to prevent the overflow error.
Thanks a lot!

Peter

http://www.infopx.com
Nov 16 '05 #1
4 1931
"Peter" <yu******@hotmail.com> wrote:
My program causes StackOverflow because it makes
many recursive calls due to the program's nature (not
a bug!).


What are you doing recursively? There might be a better way.

P.
Nov 16 '05 #2
> My program causes StackOverflow because it makes many recursive calls due
to
the program's nature (not a bug!).
I would like to know if there is any settings in the compiler or VS.NET IDE so that I can increase the stack size to prevent the overflow error.
Thanks a lot!

If your program needs so much stack that the default stack size is not
sufficient then you certainly doing things wrong. maybe there is no need for
recursion or you can minimize the number of arguments or locals in your
method.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 16 '05 #3
>If your program needs so much stack that the default stack size is not
sufficient then you certainly doing things wrong. maybe there is no need
for
recursion or you can minimize the number of arguments or locals in your
method

I would tend to agree. The stack size should be more than sufficient
--
-----
Sam Gentile
Microsoft MVP - C#/.NET
..NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
---------
"cody" <pl*************************@gmx.de> wrote in message
news:eN**************@TK2MSFTNGP09.phx.gbl...
My program causes StackOverflow because it makes many recursive calls due

to
the program's nature (not a bug!).
I would like to know if there is any settings in the compiler or VS.NET

IDE
so that I can increase the stack size to prevent the overflow error.
Thanks a lot!

If your program needs so much stack that the default stack size is not
sufficient then you certainly doing things wrong. maybe there is no need
for
recursion or you can minimize the number of arguments or locals in your
method.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk

Nov 16 '05 #4
Thanks for all your helps. I tried to recursive about 1000 times and then
found that the stack was overflow. Well, there's another way to solve the
problem... I am just a bit lazy to think about it because the recursive one
is very simple.

Peter

http://www.infopx.com
"Sam Gentile [MVP - C#/.NET]" <no****@nomail.com> wrote in message
news:eR**************@tk2msftngp13.phx.gbl...
If your program needs so much stack that the default stack size is not
sufficient then you certainly doing things wrong. maybe there is no need
for
recursion or you can minimize the number of arguments or locals in your
method

I would tend to agree. The stack size should be more than sufficient
--
-----
Sam Gentile
Microsoft MVP - C#/.NET
.NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
---------
"cody" <pl*************************@gmx.de> wrote in message
news:eN**************@TK2MSFTNGP09.phx.gbl...
My program causes StackOverflow because it makes many recursive calls
due to
the program's nature (not a bug!).
I would like to know if there is any settings in the compiler or VS.NET

IDE
so that I can increase the stack size to prevent the overflow error.
Thanks a lot!

If your program needs so much stack that the default stack size is not
sufficient then you certainly doing things wrong. maybe there is no need
for
recursion or you can minimize the number of arguments or locals in your
method.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk


Nov 16 '05 #5

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

Similar topics

14
by: Kevin Grigorenko | last post by:
Hello, I couldn't find an obvious answer to this in the FAQ. My basic question, is: Is there any difference in allocating on the heap versus the stack? If heap or stack implementation is not...
2
by: RA Scheltema | last post by:
hi there, I'm working on a project in Visual Basic .NET, which makes use of a dll that rquires quite a lot of stack space. Is there a way to increase the available stack space (about 10 mb...
10
by: Shuo Xiang | last post by:
Greetings: I know that variables declared on a stack definitely does not reside in heap space so there is only a very limited amount of stuff that you can store in the stack of a function. But...
22
by: bitshadow | last post by:
using the following code, i was able to have my compiler seg fault on me when i gave the argument as anythng greater than 20,832,000bytes. In the case of the struct its 868 instances of said...
13
by: Ben R. Bolton | last post by:
The documentation indicates that the threads "default stack size" is 1MB. The work "default" implies that it can be changed. Is it possible to change the StackSize in .NET? If so how? Is it...
4
by: Peter | last post by:
My program causes StackOverflow because it makes many recursive calls due to the program's nature (not a bug!). I would like to know if there is any settings in the compiler or VS.NET IDE so that...
2
by: Peter Oliphant | last post by:
Hey, is there a limit to the stack size? I realize of course there must be, but how is this determined/set? Or does it self adjust up to, say, available memory (and possibly virtual memory from...
1
by: alfie27 | last post by:
I currently have a working program that is a stack that stores integers. Now i have to convert it to store strings instead of integers. I have been working on this for hours and just keep getting...
9
by: Jensen Somers | last post by:
Hi, Is it possible to change the stack size of a DLL from within the source code? When using threads you can specify the size of the stack you want the thread to use, but since my application...
3
by: mark4asp | last post by:
Stack of limited size containing unique items? Hi guys, How would I implement a stack of limited size containing unique items? For example. Suppose my stack has . I add 2 to it and it is now...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.