This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
re: Default stack size
- From: "John (Eljay) Love-Jensen" <eljay at adobe dot com>
- To: <jfranzoy at yahoo dot com dot ar>
- Cc: "MSX to GCC" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 26 Sep 2007 08:51:56 -0700
- Subject: re: Default stack size
Hi Juan,
> Is there an c/c++ compiler or linker option to set the default stack size of a thread?
No. Threading is not part of the C (ISO 9899) or C++ (ISO 14882) specification. Alas.
> Is it possible to get in runtime the default stack size?
Depends on your platform.
Depending on your platform, the default stack size may be determined by your OS (e.g., Unix), or the hardware (e.g., 6502), or your compiler (e.g., Amiga OS and Manx, Lattice or SAS).
So without further information regarding which platform you are referring to, I cannot say.
For the moment I presume you are using some sort of Unix, in which case (most likley) the command line is ulimit -a.
HTH,
--Eljay