🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #13318

Re: Maximum Swap per Process Limit in SUNOS 4.0

#13318
From: Chet Murthy
Date: Wed, 20 Dec 1989 05:44
45 lines
1807 bytes
Does anybody out there know how to increase the max datasize per process
limit under SUNOS 4.0?  I have a sun-4/260 here with 1.6Gigabytes of swap,
and I'd like to use most of that for a really big symbolic processing job.

I'm currently getting a "mere" 512MB (1/2 Gig) right now per process.

Also, the setrlimit(2) call does not work as advertised, as far as I can
tell.  The following code, when run as root, does _not_ increase the data
limit:

#include <stdio.h>
#include <sys/time.h>
#include <sys/resource.h>
extern int errno;


struct rlimit rl;

main(ac,av)
int ac;
char **av;
{
	int rv,i=0;
	rv = getrlimit(RLIMIT_DATA,&rl);
	printf("%d,%d\n",rl.rlim_cur,rl.rlim_max);
	if(rv == -1) printf("read failed, %d\n",errno);
	rl.rlim_cur = 513*1024*1024;
	rl.rlim_max = 513*1024*1024;
	rv = setrlimit(RLIMIT_DATA,&rl);
	if(rv == -1) printf("failed, %d\n",errno);
	rv = getrlimit(RLIMIT_DATA,&rl);
	if(rv == -1) printf("read failed, %d\n",errno);
	printf("%d,%d\n",rl.rlim_cur,rl.rlim_max);

}

As you can tell, the code first gets and prints out the data size limit,
then increases it to 513 MB, sets it, reads it back out, and prints out
the value just read.  I check the error codes and all, and yet it does NOT
increase the data limit.

Again, any help would be greatly appreciated.

Thanks,
--chet--
Technical Details
Message-ID: <3992@brazos.Rice.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!sun-spots-request
From: murthy@algron.cs.cornell.edu (Chet Murthy)
Newsgroups: comp.sys.sun
Subject: Re: Maximum Swap per Process Limit in SUNOS 4.0
Keywords: SunOS
Message-ID: <3992@brazos.Rice.edu>
Date: 20 Dec 89 05:44:25 GMT
Sender: root@rice.edu
Organization: Sun-Spots
Lines: 45
Approved: Sun-Spots@rice.edu
X-Sun-Spots-Digest: Volume 8, Issue 228, message 4 of 18