Date: Sat, 28 Nov 2009 21:13:48 +1100 From: Andrew MacIntyre <andymac@bullseye.apana.org.au> To: FreeBSD Hackers <freebsd-hackers@FreeBSD.org> Subject: Re: heap limits: mmap(2) vs. break(2) on i386 Message-ID: <4B10F7DC.1080408@bullseye.andymac.org> In-Reply-To: <4B10896E.3080201@sippysoft.com> References: <4B1041EB.9020109@sippysoft.com> <4B1059CA.6040605@FreeBSD.org> <4B10687D.3050209@sippysoft.com> <4B107D29.5030307@FreeBSD.org> <4B10896E.3080201@sippysoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Maxim Sobolev wrote: > Jason Evans wrote: >> I would set MAXDSIZ to 0, so that the maximum amount of memory is >> available for mapping shared libraries and files, and allocating via >> malloc. This may cause problems with a couple of ports that implement >> their own memory allocators based on sbrk, but otherwise it should be >> all good. You might also set /etc/malloc.conf to 'd' in order to >> disable the sbrk calls. > > I see, thank you for the explanation. One of the problem that we are > having is that we use a lot of interpreted languages in our environment > (python, php etc), and most of those implement their own memory > allocators, some of which rely on sbrk(2) unfortunately. I believe > that's where that 2GB limit of ours comes from - one of our Python > applications is very memory hungry and we had to bump that limit to > allow it sufficient room. While Python has its own allocator, it relies on the platform malloc() rather than sbrk(), and therefore Jason's suggestion to use '-d' in /etc/malloc.conf should be effective for it. -- ------------------------------------------------------------------------- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: andymac@bullseye.apana.org.au (pref) | Snail: PO Box 370 andymac@pcug.org.au (alt) | Belconnen ACT 2616 Web: http://www.andymac.org/ | Australia
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B10F7DC.1080408>