On Tue, 21 Sep 2010 11:37:07 -0700
Chuck Swiger <cswi...@mac.com> wrote:

> Hi--
> 
> On Sep 21, 2010, at 11:09 AM, Török Edwin wrote:
> [ ... ]
> > If it shows ~120M your OS is buggy.
> > Then run again with ulimit -d 2097151, and see if it reports any
> > higher value.
> 
> Interesting; even on FreeBSD I get:
> 
> % ./a.out
> failed after 15529 mmap() calls, allocated 2426 MB memory
> [1]    1500 abort      ./a.out
> 
> A bit of experimentation suggests that FreeBSD's mmap() pays
> attention to ulimit on VM size, not data segment size:

Yes, that is what a good OS *should* do.
It is not what FreeBSD 7.3 does though, see the bugreport.
The bugreporter had kern.maxdsiz set to nondefault values though.

> 
> % ulimit -v 256000
> % ./a.out
> failed after 1591 mmap() calls, allocated 248 MB memory
> [1]    1544 abort      ./a.out
> 
> % uname -a
> FreeBSD example.com 6.4-STABLE FreeBSD 6.4-STABLE #0: Mon Sep 20

Depends on version, the problem was with FreeBSD 7.3.

Best regards,
--Edwin
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to