Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Mar 2002 13:11:35 -0800 (PST)
From:      Kip Macy <kmacy@netapp.com>
To:        Miguel Mendez <flynn@energyhq.homeip.net>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: mmap and efence
Message-ID:  <Pine.GSO.4.10.10203191303250.3121-100000@orbit>
In-Reply-To: <20020319205514.A79707@energyhq.homeip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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
>   <bruce@perens.com>
> 
>   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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10203191303250.3121-100000>