[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-questions
Subject:    Re: stack overflow
From:       Mehmet Erol Sanliturk <m.e.sanliturk () gmail ! com>
Date:       2013-06-29 10:13:36
Message-ID: CAOgwaMuihgScssQDjPcE-gz6ZDpHdkpVfQDsqvUK4Gj5mFgEFQ () mail ! gmail ! com
[Download RAW message or body]

Making single variables a record and then passing that single record ( not
by value , but by reference )  may reduce stack requirement .


New stack size ( 20 * 1024 * 1024 ) may not be effective . There is a
necessity to check that the new definition is accepted .

There may be a large recursive call number to exhaust the stack . If there
is such a recursive call , elimination of this recursive call may reduce
the required stack size .

If local data size is large , moving them into a record , and allocating
that record in heap may reduce stack requirement .


Thank you very much .

Mehmet Erol Sanliturk







On Sat, Jun 29, 2013 at 5:35 AM, Peter Laurie <p.c.s.laurie.58@cantab.net>wrote:

> Hi
> 
> I'm working on a program using FreeBSD v 1.7.
> 
> This project has been going for years and has a lot of functions calls
> some using far more arguments than these. I've never seen this error before.
> 
> I have one funct8ion that has suddenly refused to run because on the call
> I get a 'stack overflow' message.
> 
> I'm passing a pointer to a structure and then 5 ints. Everything is fine,
> but I need to pass a bit more data. If I pass a sixth int I get the
> overflow message.
> 
> I've increased the stack from the default 4096 to 20 * 1024 * 1024 without
> effect.
> 
> Yours Peter Laurie
> --
> Peter Laurie
> Office (44) 01305 871131
> Home (44) 01305 871532
> Voice messaging on both lines, but I don't often check it.
> Email is more reliable.
> 
> Interested in Roman roads? Have a look at http://alsystems.algroup.co.**
> uk/archaeology <http://alsystems.algroup.co.uk/archaeology>
> 
> Beneath the City Streets is on Google Books at
> 
> http://books.google.com/books?**id=zAf-uwRCdXwC<http://books.google.com/books?id=zAf-uwRCdXwC>
>  ______________________________**_________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions<http://lists.freebsd.org/mailman/listinfo/freebsd-questions>
>  To unsubscribe, send any mail to "freebsd-questions-**
> unsubscribe@freebsd.org <freebsd-questions-unsubscribe@freebsd.org>"
> 
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic