From owner-freebsd-current@FreeBSD.ORG Fri Feb 27 02:14:11 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A48D416A4CE for ; Fri, 27 Feb 2004 02:14:11 -0800 (PST) Received: from clueful.shagged.org (clueful.shagged.org [212.13.201.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78D7A43D2D for ; Fri, 27 Feb 2004 02:14:11 -0800 (PST) (envelope-from chris@clueful.shagged.org) Received: from chris by clueful.shagged.org with local (Exim 4.30; FreeBSD) id 1Awf0U-000Bo8-9C for freebsd-current@freebsd.org; Fri, 27 Feb 2004 10:14:10 +0000 Date: Fri, 27 Feb 2004 10:14:10 +0000 From: Chris Elsworth To: freebsd-current@freebsd.org Message-ID: <20040227101410.GA45369@shagged.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Sender: Chris Elsworth X-SA-Exim-Mail-From: chris@clueful.shagged.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Mailman-Approved-At: Fri, 27 Feb 2004 05:25:11 -0800 Subject: mdconfig unable to allocate memory X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2004 10:14:11 -0000 Hello, I'm just fiddling with mdconfig and trying to create a rather large memory disk, but I can't understand why it's failing. this fails: cluestick# mdconfig -a -t malloc -o reserve -s 1g mdconfig: ioctl(/dev/mdctl): Cannot allocate memory But given these variables, shouldn't it work..? cluestick# limits Resource limits (current): cputime infinity secs filesize infinity kb datasize 2097152 kb stacksize 2097152 kb coredumpsize infinity kb memoryuse infinity kb memorylocked infinity kb maxprocesses 5547 openfiles 11095 sbsize infinity bytes vmemoryuse infinity kb uestick# egrep "(MAXDSIZ|MAXSSIZ|DFLDSIZ)" /usr/src/sys/i386/conf/CLUESTICK options MAXDSIZ=(2048UL*1024*1024) options MAXSSIZ=(2048UL*1024*1024) options DFLDSIZ=(1024UL*1024*1024) cluestick# sysctl -a | egrep "hw.(phys|user)mem" hw.physmem: 4222963712 hw.usermem: 4171063296 %./test & && ps u | grep test [7] 648 chris 645 0.0 0.0 1050788 1612 p2 SL 10:14AM 0:00.01 ./test What have I missed? Is mdconfig simply not designed to cope with memory disks this large? I was eventually hoping to create around 2GB. As you can see, ./test is managing to malloc(1024*1024*1024) and then sleep, although it doesn't touch any of it. Cheers for any advice, -- Chris