This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Program stack question

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, then do

% vi

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}.


> Regards,
> Martin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]