From owner-freebsd-questions@FreeBSD.ORG Sat Jun 29 10:13:37 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9225F629 for ; Sat, 29 Jun 2013 10:13:37 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-vb0-x22a.google.com (mail-vb0-x22a.google.com [IPv6:2607:f8b0:400c:c02::22a]) by mx1.freebsd.org (Postfix) with ESMTP id 582A71088 for ; Sat, 29 Jun 2013 10:13:37 +0000 (UTC) Received: by mail-vb0-f42.google.com with SMTP id i3so2426835vbh.1 for ; Sat, 29 Jun 2013 03:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=oF0jp0CjKFoYp49lIAlq6yb94xL2hJljUDlip1vwdXs=; b=nruTQ00kV7s6bX6/cEoOqh1UGfyt3v37L9UGyzVyKtrazNwXugHB9GQEL0lU60YoXU z2QvEEQTCgDP/VeH+J4oDtfB5XSql1jvpof3nXGpYnEsWQ52qPz9rIyHE0eBVmJuqfYH jVm7rNltl4zdR4d8p+xRgnRjIKjyxDtVXOdy9M5jIAWap7gr0JwlaDrA9bHRrP0ugiq9 JsIinQV6giyMMD9VynTh0zg11L1cY04ZKD6FYCauRgJu0hMBs/rrrB4wai5U7eCjSXU5 +Ren6MMq5Mj50nRw1oEgreWrIftUPKlOW02nqU5wOhYVLS9tHc06e5C8338JnUowNJeC la4g== MIME-Version: 1.0 X-Received: by 10.221.5.71 with SMTP id of7mr6981527vcb.39.1372500816829; Sat, 29 Jun 2013 03:13:36 -0700 (PDT) Received: by 10.59.12.232 with HTTP; Sat, 29 Jun 2013 03:13:36 -0700 (PDT) In-Reply-To: <51CEAA5B.7040908@cantab.net> References: <51CEAA5B.7040908@cantab.net> Date: Sat, 29 Jun 2013 06:13:36 -0400 Message-ID: Subject: Re: stack overflow From: Mehmet Erol Sanliturk To: Peter Laurie Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jun 2013 10:13:37 -0000 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 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 > > Beneath the City Streets is on Google Books at > > http://books.google.com/books?**id=zAf-uwRCdXwC > ______________________________**_________________ > 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 " >