Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jun 2013 06:13:36 -0400
From:      Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com>
To:        Peter Laurie <p.c.s.laurie.58@cantab.net>
Cc:        "questions@freebsd.org" <questions@freebsd.org>
Subject:   Re: stack overflow
Message-ID:  <CAOgwaMuihgScssQDjPcE-gz6ZDpHdkpVfQDsqvUK4Gj5mFgEFQ@mail.gmail.com>
In-Reply-To: <51CEAA5B.7040908@cantab.net>
References:  <51CEAA5B.7040908@cantab.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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>"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOgwaMuihgScssQDjPcE-gz6ZDpHdkpVfQDsqvUK4Gj5mFgEFQ>