From owner-freebsd-questions@FreeBSD.ORG Mon Jan 31 00:14:57 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E81D516A4CE for ; Mon, 31 Jan 2005 00:14:57 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AE1C43D31 for ; Mon, 31 Jan 2005 00:14:54 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a019.otenet.gr [212.205.215.19]) j0V0Elgf004045; Mon, 31 Jan 2005 02:14:51 +0200 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id j0UF7Wvr063471; Sun, 30 Jan 2005 17:07:32 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id j0UF7WZH063470; Sun, 30 Jan 2005 17:07:32 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Sun, 30 Jan 2005 17:07:32 +0200 From: Giorgos Keramidas To: dkouroun@cc.uoi.gr Message-ID: <20050130150732.GA63409@gothmog.gr> References: <20050129120037.2E16A16A4D3@hub.freebsd.org> <1107027374.41fbe5ae47d36@webmail.uoi.gr> <41FC6144.90405@incubus.de> <1107067917.41fc840d574dd@webmail.uoi.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1107067917.41fc840d574dd@webmail.uoi.gr> cc: freebsd-questions@freebsd.org Subject: Re: having 1.5GB RAM I cannot allocate more than 512MB RAM in 4.10 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2005 00:14:58 -0000 On 2005-01-30 08:51, dkouroun@cc.uoi.gr wrote: > > Guys thanks for the help but it doesn't want to work! Actually, it works, but you are limited by the maximum allowable data size of the VM system. > Infact my data size setting in /etc/login.conf is unlimited by > default. True, but this won't work. Even if you set datasize to a large number of bytes, i.e. 8589934592 (800 MB), you are limited by the internal kernel limit for the maximum data size. This is defined in /usr/src/sys/i386/include/vmparam.h as: #define MAXDSIZ (512UL*1024*1024) /* max data size */ When the setting of login.conf is applied, the following code runs from `src/sys/kern/kern_resource.c' (the implementation of the setrlimit(2) syscall): int kern_setrlimit(td, which, limp) struct thread *td; u_int which; struct rlimit *limp; { [...] case RLIMIT_DATA: if (limp->rlim_cur > maxdsiz) limp->rlim_cur = maxdsiz; if (limp->rlim_max > maxdsiz) limp->rlim_max = maxdsiz; break; Thus, the maximum data segment size is limited by the value of `maxdsiz'. The `maxdsiz' limit is tunable at boot time, by setting the "kern.maxdsiz" option in your `/boot/loader.conf' file. - Giorgos