stack overflow exception

S

samuraign

Hi,
My C-code is working properly in Cygwin.
But when I run the same code in VC++ or LCC,
I use to get stack overflow exception during run time.
It is not entring into my function from testbench.
My function consists of two inputs of each 8192 size of array.
And output too same.

Can any body give some suggestion.
Is it compiler problem or my code problem.
 
I

Ian Collins

Hi,
My C-code is working properly in Cygwin.
But when I run the same code in VC++ or LCC,
I use to get stack overflow exception during run time.
It is not entring into my function from testbench.
My function consists of two inputs of each 8192 size of array.
And output too same.

Can any body give some suggestion.
Is it compiler problem or my code problem.
I think the group's psychics are on holiday, so you'd better show the
code for the benefit of the rest of us.
 
W

Walter Roberson

My C-code is working properly in Cygwin.
But when I run the same code in VC++ or LCC,
I use to get stack overflow exception during run time.
It is not entring into my function from testbench.
My function consists of two inputs of each 8192 size of array.
And output too same.

If you have local variables of that size, then your arrays might
be larger than are permitted for local variables by that compiler.
You might need other compiler options, or you might need to rewrite
the code to use malloc().
 
S

samuraign

Hi,
Thank you very much.
I have modified my code to use malloc for my local variables
and the problem is solved.
 
P

Peter Shaggy Haywood

Groovy hepcat (e-mail address removed) was jivin' on 15 Oct 2006 23:56:41
-0700 in comp.lang.c.
stack overflow exception's a cool scene! Dig it!
My C-code is working properly in Cygwin.

What code?
But when I run the same code in VC++ or LCC,
I use to get stack overflow exception during run time.

What code?
It is not entring into my function from testbench.

What? The above line makes no sense.
My function consists of two inputs of each 8192 size of array.

What function?
And output too same.

Output of what?
Can any body give some suggestion.

Yes. Fix the code. If you are having trouble doing so, post the code
(cut down to the smallest *complete* program that displays the
problem, if the whole thing is too big to post), with a concise
explanation of what it is meant to do and how it is supposed to work,
as well as a concise but reasonably detailed description of the
problem.
Is it compiler problem or my code problem.

Silly question! (I assume it's meant to be a question. Though it
doesn't end in a question mark.)

--

Dig the even newer still, yet more improved, sig!

http://alphalink.com.au/~phaywood/
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technically correct" English; but since when was rock & roll "technically correct"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top