Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2001 13:11:47 +0200
From:      Raymond Wiker <Raymond.Wiker@fast.no>
To:        "Chojin" <freebsd@tarakan-network.com>
Cc:        <freebsd-questions@FreeBSD.ORG>, <freebsd-hackers@FreeBSD.ORG>
Subject:   root is limited ? :-o
Message-ID:  <15243.31859.851226.854660@raw.grenland.fast.no>
In-Reply-To: <00af01c12f17$56bc7870$0245a8c0@chojin>
References:  <00af01c12f17$56bc7870$0245a8c0@chojin>

next in thread | previous in thread | raw e-mail | index | archive | help
Chojin writes:
 > Hello,
 > 
 > I see a strange thing:
 > 
 > with bash (or tcsh or any other shell) when I try to modify virtual memory
 > limit with ulimit by ex:
 > ulimit -v unlimited (or any number).
 > 
 > When I use limit in tcsh to change virtual memory, I can put anything, it
 > doesn't modify anything.
 > virtual memory (kbytes)  24576
 > 
 > Same thing for data size.
 > 
 > It's strange because I've got enough memory:
 > Mem: 61M Active, 270M Inact, 53M Wired, 308K Cache, 73M Buf, 241M Free
 > Swap: 800M Total, 800M Free
 > 
 > 
 > Anyone has got an idea ?

	I think that the virtual memory size for a process is
dependent on two other values: the data segment size and the stack
size. The maximum data segment size is determined by the MAXDSIZE (set
in the kernel config file); there is also a "default data segment size
(DFLDSIZE, also in the kernel config file).

	If your kernel has both of these set, and DLFDSIZE is less
than MAXDSIZE, you should be able to increase the data segment size
(note: it appears that you have to be root to increase the limits). At
any rate, it does not appear that you can set the virtual memory size
separately. 

	I think this is unfortunate; I have applications where I
want to do anonymous mmap at fixed addresses, and these addresses must
be outside the "data segment". The total amount of vm for the
application is determined by the data segment size and stack size, and
this may be insufficient if the memory mapped segments are large.

	//Raymond.

-- 
Raymond Wiker
Raymond.Wiker@fast.no

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15243.31859.851226.854660>