On Mon, Mar 21, 2011 at 10:37:17AM -0400, Dave Love wrote:
Jesse Becker <[email protected]> writes:

Rss is documented as ignored in recent Linuxen -- see setrlimit(2).  I
doubt data is ignored, but it's not what you normally want, e.g. it
doesn't limit memory malloced via mmap.  (I speak from experience of
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
setting the wrong limits.)

It was ignored in my testing. I have a simple memory allocation
program, and set rss, data, and as to various different limits so as to
watch when the malloc() failed.  The testing was, in essence:
        1) set the limilts rss=10M, data=20M, as=30M,
        2) allocate memory in 1M chunks and see where it fails
                             ^^^^^^^^^

The program is configurable in allocation sizes.  In my acutal testing,
I tended to use chunks on the order of 200M.  The 10/20/30 sizes and 1M
chunks were just for purpose of example.

I deduce you were using GNU malloc with the default parameters, and so

Correct.

allocating using mmap.  That doesn't extend the data segment.  See info
`glibc(Malloc Tunable Parameters)' or recent Debian's malloc(3).  RedHat
5's malloc(3), at least, doesn't document it for some reason.

This isn't specific to Linux and glibc, by the way.  I guess you'd see
the same on Solaris, though I don't recall what its default malloc does.

I'll check out the references.  But, in practice, the as limit is the
only thing that matters for us, due to how user programs are doing their
allocations.


--
Jesse Becker
NHGRI Linux support (Digicon Contractor)
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to