Re: "Program exited with status value:45. mi_cmd_stack_list_frames_lite: No stack." Eh?
Re: "Program exited with status value:45. mi_cmd_stack_list_frames_lite: No stack." Eh?
- Subject: Re: "Program exited with status value:45. mi_cmd_stack_list_frames_lite: No stack." Eh?
- From: Eric Albert <email@hidden>
- Date: Tue, 19 Jul 2005 18:17:09 -0700
On Jul 19, 2005, at 5:44 PM, Sailesh Agrawal wrote: Eric Albert wrote:
On Jul 19, 2005, at 4:38 PM, Sailesh Agrawal wrote:
It turns out that my most thread in my application were using about 1 MB of stack each. Carbon thread have a default stack limit of 4kb and Cocoa (pthread) have a default stack limit of 512 kB. Usually when you run of the stack limit you won't notice right away. Until you right over some data that you'll need :-P
Are you talking about Carbon Thread Manager threads? Because threads in both Carbon and Cocoa apps are based on pthreads and have the same amount of stack space, which is 8 MB on the main thread -- run 'limit stacksize' on the command line to see that -- and something less than that (512K, perhaps) on secondary threads.
That's weird. So it's 8MB for the main thread than aditional stack space per thread?
Each thread has a separate stack. It's 8 MB for the main thread and then each secondary thread's stack defaults to 512 KB (I just asked our pthreads expert). I was looking at MPCreateTask:
In particular notice the comment "Specifying zero for the size will result in a default stack size of 4KB." In my application I was specifying 0 :-P
The documentation is wrong. At least, the Tiger version uses a 512 KB stack unless you pass in a larger value. I'll file a bug report to get the documentation changed.
-Eric
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden