Thread View: comp.sys.mac.programmer.codewarrior
4 messages
4 total messages
Started by Paul Russell
Wed, 19 Jun 2002 22:59
How do I set the stack size for a Mach-O application ?
Author: Paul Russell
Date: Wed, 19 Jun 2002 22:59
Date: Wed, 19 Jun 2002 22:59
10 lines
1752 bytes
1752 bytes
I'm porting some Carbon CFM to Carbon Mach-O (so that I can link in some gcc-style assembler), and one problem I have hit is that there doesn't seem to be any way to set the stack size for a Mach-O executable. I know that I need about 2 Mb of stack and sure enough my Mach-O app crashes on entry to one of the routines that uses a lot of stack space, so I'm guessing that the default Mach-O stack size is probably quite small. Do I have to do something arcane like create a linker control file or some such nastiness ?... Paul
Re: How do I set the stack size for a Mach-O application ?
Author: Paul Russell
Date: Thu, 20 Jun 2002 00:30
Date: Thu, 20 Jun 2002 00:30
24 lines
2059 bytes
2059 bytes
Paul Russell wrote: > > I'm porting some Carbon CFM to Carbon Mach-O (so that I can link in some > gcc-style assembler), and one problem I have hit is that there doesn't > seem to be any way to set the stack size for a Mach-O executable. I know > that I need about 2 Mb of stack and sure enough my Mach-O app crashes on > entry to one of the routines that uses a lot of stack space, so I'm > guessing that the default Mach-O stack size is probably quite small. Do > I have to do something arcane like create a linker control file or some > such nastiness ?... > I found a partial solution to this on the cocoa-dev mailing list. If I run my app from a terminal window and do something like: % limit stacksize 2048 beforehand, then it runs fine. However I'd still like to be able to launch and debug my app from CodeWarrior and these doesn't seem to be any way to do this... Paul
Re: How do I set the stack size for a Mach-O application ?
Author: Bo Lindbergh
Date: Thu, 20 Jun 2002 07:36
Date: Thu, 20 Jun 2002 07:36
4 lines
1078 bytes
1078 bytes
The setrlimit system call is what you want. /Bo Lindbergh (see X-From header field)
Re: How do I set the stack size for a Mach-O application ?
Author: Paul Russell
Date: Thu, 20 Jun 2002 18:07
Date: Thu, 20 Jun 2002 18:07
8 lines
1400 bytes
1400 bytes
Bo Lindbergh wrote: > > The setrlimit system call is what you want. > Excellent, thanks. That works. Paul
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads