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 malloc failed at 30M. > > I then set the limits: as=10M, rss=20M, data=30M, and ran the program > again. > > The malloc failed at 10M. > > Thus, for my *simple* testing, data and rss are both ignored (and yes, > rss *is* documented as being ignored, but data is not).
I deduce you were using GNU malloc with the default parameters, and so 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. _______________________________________________ users mailing list [email protected] https://gridengine.org/mailman/listinfo/users
