From owner-freebsd-questions Tue Aug 28 4:12: 0 2001 Delivered-To: freebsd-questions@freebsd.org Received: from tepid.osl.fast.no (tepid.osl.fast.no [213.188.9.130]) by hub.freebsd.org (Postfix) with ESMTP id 714CD37B405; Tue, 28 Aug 2001 04:11:53 -0700 (PDT) (envelope-from raw@fast.no) Received: from raw.grenland.fast.no (fw-oslo.fast.no [213.188.9.129]) by tepid.osl.fast.no (8.9.3/8.9.1) with ESMTP id NAA73667; Tue, 28 Aug 2001 13:11:50 +0200 (CEST) (envelope-from raw@fast.no) Received: (from raw@localhost) by raw.grenland.fast.no (8.11.3/8.11.3) id f7SBBl581357; Tue, 28 Aug 2001 13:11:47 +0200 (CEST) (envelope-from raw) From: Raymond Wiker MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15243.31859.851226.854660@raw.grenland.fast.no> Date: Tue, 28 Aug 2001 13:11:47 +0200 To: "Chojin" Cc: , Subject: root is limited ? :-o In-Reply-To: <00af01c12f17$56bc7870$0245a8c0@chojin> References: <00af01c12f17$56bc7870$0245a8c0@chojin> X-Mailer: VM 6.92 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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