• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stack size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stack size


  • Subject: Re: Stack size
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 26 Dec 2001 17:01:56 -0800

On Wednesday, December 26, 2001, at 04:39 PM, Hampus Edvardsson wrote:

> I am trying to build and run a program that needs to allocate
> 512 kB on the stack (by doing: int data[512*256];). The code
> compiles but when I run it, it gets a EXC_BAD_ACCESS signal and
> dies.
>
> I found out that the reason this happens is because the default
> maximum stack size is set to 512 kbytes, and that that value
> could be changed in tcsh with the command "limit stacksize
> 8192". After giving that command the application runs fine when
> started from the same terminal.
>
> Is there any way to specify the maximum stack size inside the
> application, so it will run when started from the finder?

Why don't you just call malloc() instead?

-jcr

Support your right to protest a criminal nut-cult.
http://freehenson.da.ru/


  • Follow-Ups:
    • RE: Stack size
      • From: Brian Hook <email@hidden>
References: 
 >Stack size (From: Hampus Edvardsson <email@hidden>)

  • Prev by Date: Stack size
  • Next by Date: RE: Stack size
  • Previous by thread: Stack size
  • Next by thread: RE: Stack size
  • Index(es):
    • Date
    • Thread