From owner-freebsd-questions Wed Jan 9 22: 0:39 2002 Delivered-To: freebsd-questions@freebsd.org Received: from fedde.littleton.co.us (cfedde.dsl.frii.net [216.17.139.141]) by hub.freebsd.org (Postfix) with ESMTP id 5485537B41A for ; Wed, 9 Jan 2002 22:00:37 -0800 (PST) Received: from fedde.littleton.co.us (localhost [127.0.0.1]) by fedde.littleton.co.us (8.11.6/8.11.4) with ESMTP id g0A60ZO10111; Wed, 9 Jan 2002 23:00:35 -0700 (MST) Message-Id: <200201100600.g0A60ZO10111@fedde.littleton.co.us> To: James Long Cc: freebsd-questions@FreeBSD.ORG Subject: Re: cmp: Cannot allocate memory In-Reply-To: <20020109210100.A446@ns.museum.rain.com> From: Chris Fedde Date: Wed, 09 Jan 2002 23:00:35 -0700 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 On Wed, 9 Jan 2002 21:01:00 -0800 James Long wrote: +------------------ | # cmp a b | cmp: b: Cannot allocate memory +------------------ This surprises me. I'll look into it. ... Looking at the source for cmp shows that it uses mmap to access the file data. The mmap manual page indicates that it will fail if the ammount of memory that has been mapped exceeds the kernel parameter vm.max_proc_mmap. I'd guess that this is what is happening. It seems silly to me that the utility would be written this way. I'd have expected that it would be written in terms of read(2) rather than mmap(2). Still you may be able to fix this by bumping the value of vm.max_proc_mmap with sysctl. Good Luck -- Chris Fedde To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message