9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] mainstacksize
@ 2002-08-08  8:05 okamoto
  0 siblings, 0 replies; 2+ messages in thread
From: okamoto @ 2002-08-08  8:05 UTC (permalink / raw)
  To: 9fans

Theradmain prepares 8 Kbytes stack area fot it, according to the manual.
I have a program using threadmain, and from which a function having a 200x200
float array.   I put this array to static memory, however, it requires more than
8 Kbytes threadmain's stack area.   (When I use the array as local, it goes to more
miserabble result.)
Therefore, I enlarged the default value of the stack size of the threadmain to 30Kbytes,
and now the function works more stablly. (I'm still debugging!)   Why a farely large
array put in a static/global field can be affected from the stack of the threadmain?
What's the meaning of mainstacksize of thread library?

Kenji



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] mainstacksize
@ 2002-08-08 14:44 Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2002-08-08 14:44 UTC (permalink / raw)
  To: 9fans

Can you post a simple, short program that demonstrates
your problem?  A large global or static array shouldn't
change how much stack you need.

Russ


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-08 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-08  8:05 [9fans] mainstacksize okamoto
2002-08-08 14:44 Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).