public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Program stack question
@ 2000-05-30 13:36 Jerry Donohue
  2000-05-30 23:10 ` Martin v. Loewis
  0 siblings, 1 reply; 3+ messages in thread
From: Jerry Donohue @ 2000-05-30 13:36 UTC (permalink / raw)
  To: help-gcc

To whom it may concern:

 Is it possible to set the stack size for a program?? 
 If so, how can this be done??
 This is using GCC on a SUN Solaris system.

Regards,
Jerry Donohue
jdonohue@acetsw.amat.com
(408) 986-2923

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

* Re: Program stack question
  2000-05-30 13:36 Program stack question Jerry Donohue
@ 2000-05-30 23:10 ` Martin v. Loewis
  2000-05-31 11:23   ` Mike Corbeil
  0 siblings, 1 reply; 3+ messages in thread
From: Martin v. Loewis @ 2000-05-30 23:10 UTC (permalink / raw)
  To: jdonohue; +Cc: help-gcc

>  Is it possible to set the stack size for a program?? 
>  If so, how can this be done??
>  This is using GCC on a SUN Solaris system.

Not in the compiler, no. If possible at all, it would be a property of
the linker or the operating system. On Solaris, see limit(1) for
details.

Regards,
Martin

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

* Re: Program stack question
  2000-05-30 23:10 ` Martin v. Loewis
@ 2000-05-31 11:23   ` Mike Corbeil
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Corbeil @ 2000-05-31 11:23 UTC (permalink / raw)
  To: help-gcc

Martin v. Loewis wrote:

> >  Is it possible to set the stack size for a program??
> >  If so, how can this be done??
> >  This is using GCC on a SUN Solaris system.
>
> Not in the compiler, no. If possible at all, it would be a property of
> the linker or the operating system. On Solaris, see limit(1) for
> details.
>

Just in case limit might be wrong, ulimit is what I believe is being
referred to, for Linux and some Unix platforms I've worked on, that is,
if limit is a shell built-in.  There aren't any bin or sbin programs
named limit on my system, and the way to get the documentation on ulimit
is to run

            man bash

Easier to dump that to a file, remove all the control characters and then
search for ulimit.  The bash man page is long so dumping to a file makes
it easier to read than using man, alone.

If you choose to do that and find the text cluttered with control
characters which shouldn't be there and wonder how to get rid of these,
then it's simple to do in vi or vim.  Read on if you want to know how to
do this.

Say you dumped the man page to file bash.man, then do

% vi bash.man
ESC
:%s/.CTRL-V+CTRL-{key}//g
:w
/ulimit

Use :w! if :w doesn't work.

The ESC isn't necessary, but ensures you're in command mode, as opposed
to insert.  All uppercase means literally that key, as does all
lowercase, except for what's in {}.   CTRL-V+CTRL-{key} means to press
ctrl-v and hold it down while pressing ctrl plus the letter or character
key shown as the control character you want to replace.  In my case, it's
ctrl-v+ctrl-h.  Otherwise, the casing is important for everything else
and the :%, /., /, :, i.e., everything else is literal, other than {key}.

mike


> Regards,
> Martin



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

end of thread, other threads:[~2000-05-31 11:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-30 13:36 Program stack question Jerry Donohue
2000-05-30 23:10 ` Martin v. Loewis
2000-05-31 11:23   ` Mike Corbeil

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 read-only IMAP folder(s) and NNTP newsgroup(s).