From owner-freebsd-hackers Tue Mar 19 13:11:42 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx01-a.netapp.com (mx01-a.netapp.com [198.95.226.53]) by hub.freebsd.org (Postfix) with ESMTP id A91C937B404 for ; Tue, 19 Mar 2002 13:11:39 -0800 (PST) Received: from frejya.corp.netapp.com (frejya [10.10.20.91]) by mx01-a.netapp.com (8.11.1/8.11.1/NTAP-1.2) with ESMTP id g2JLBa318758; Tue, 19 Mar 2002 13:11:37 -0800 (PST) Received: from orbit-fe.eng (localhost [127.0.0.1]) by frejya.corp.netapp.com (8.12.2/8.12.2/NTAP-1.4) with ESMTP id g2JLBadi022486; Tue, 19 Mar 2002 13:11:36 -0800 (PST) Received: from localhost (kmacy@localhost) by orbit-fe.eng (8.11.6+Sun/8.11.6) with ESMTP id g2JLBaF06728; Tue, 19 Mar 2002 13:11:36 -0800 (PST) Date: Tue, 19 Mar 2002 13:11:35 -0800 (PST) From: Kip Macy To: Miguel Mendez Cc: hackers@FreeBSD.ORG Subject: Re: mmap and efence In-Reply-To: <20020319205514.A79707@energyhq.homeip.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Looking at the source for efence this happens when mmap fails (in this case with ENOMEM). Looking at the man page the two possibilities are: the system has reached the per-process mmap limit specified in the vm.max_proc_mmap sysctl or insufficient memory was available. *BSD limits the maximum amount of memory that a process can mmap to swap+physical. So my previous guess was bogus, but check what GTK2 is doing with mmap. On Tue, 19 Mar 2002, Miguel Mendez wrote: > Hi hackers, > > I have started porting The Fish to GTK+ 2.0 and everything seems to work > fine, except I can no longer use Electric Fence. When I link with efence > I get the following error: > > > kajsa% time ./thefish > > Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens > > > Cannot load module > /usr/X11R6/lib/pango/1.0.0/modules/pango-basic-x.so: > /usr/X11R6/lib/pango/1.0.0/modules/pango-basic-x.so: mmap of entire > address space failed: Cannot allocate memory > Cannot load module > /usr/X11R6/lib/pango/1.0.0/modules/pango-basic-x.so: > /usr/X11R6/lib/pango/1.0.0/modules/pango-basic-x.so: mmap of entire > address space failed: Cannot allocate memory > > ElectricFence Exiting: mmap() failed: Cannot allocate memory > ./thefish 10.45s user 116.32s system 95% cpu 2:12.19 total > > This same code linked with gtk 1.2 works perfectly well both with and > without efence. This code linked with gtk 2.0 but without efence works > as well. I tried asking in the gtk developers list but got no answer at > all. I'm using the latest efence port on a 4.5-STABLE built the 3rd of > Feb. > > Any ideas about what could be causing this? > > Cheers, > -- > Miguel Mendez - flynn@energyhq.homeip.net > GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt > EnergyHQ :: http://www.energyhq.tk > FreeBSD - The power to serve! > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message