Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: lueck@gurgi.zk3.dec.com (Greg Lueck Development Environment)
Subject: Re: OSF/1 3.0 virt mem failure in C pgm
Date: 6 Dec 1994 13:35:43 GMT	[thread overview]
Message-ID: <3c1pbf$nl7@jac.zko.dec.com> (raw)
In-Reply-To: 3c0fek$jjs@narnia.ccs.neu.edu


Your program is not showing a virtual memory bug, but is exceeding the
process's default stack size limit.  By default, a process can have only
2M of stack.  If a process exceeds this limit, the kernel reports an access
violation for the memory reference that causes the stack to grow too big.

You can change the stack size limit from the shell by doing this:

From the csh:

	% limit stacksize unlimited

From the bourne or korn shells:

	$ ulimit -s 32768

You can also change the limit from within the program by using this code
fragment near the beginning:

	#include <sys/resource.h>

	struct rlimit	rlim;

	getrlimit(RLIMIT_STACK, &rlim);
	rlim.rlim_cur = rlim.rlim_max;
	setrlimit(RLIMIT_STACK, &rlim);

-- 
-------------------------------------------------------------------------------
Greg Lueck                              Opinions expressed herein are my own.
lueck@zk3.dec.com
-------------------------------------------------------------------------------
-- 
-------------------------------------------------------------------------------
Greg Lueck                              Opinions expressed herein are my own.
lueck@zk3.dec.com
-------------------------------------------------------------------------------


      reply	other threads:[~1994-12-06 13:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-06  1:40 OSF/1 3.0 virt mem failure in C pgm Peter Sherwood
1994-12-06 13:35 ` Greg Lueck Development Environment [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox