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:

% 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 16:03:45 EDT 
2010     r...@example.com:/usr/obj/usr/src/sys/GENERIC  i386
% ulimit -Ha
-t: cpu time (seconds)         unlimited
-f: file size (blocks)         unlimited
-d: data seg size (kbytes)     524288
-s: stack size (kbytes)        65536
-c: core file size (blocks)    unlimited
-m: resident set size (kbytes) unlimited
-l: locked-in-memory size (kb) unlimited
-u: processes                  3603
-n: file descriptors           7207
-N  9: socket buffer size (kb) unlimited
-v: virtual memory size (kb)   unlimited

Regards,
-- 
-Chuck

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to