Confusion regarding unit of RLIMIT_RSS
heya,
The man page for setrlimit() claims that RLIMIT_RSS is to be specified in bytes, but glibc's bits/resources.h claims it was in bytes. My suspicion is that the header is right, and the man page wrong. But of course, since the limit has no effect on Linux anyway, maybe this is not the most important thing to fix, but I thought I'd at least report the discrepancy here...
Thanks,
Lennart
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Lennart
Quoted 4 lines · Lennart Poettering
heya,
The man page for
setrlimit()claims thatRLIMIT_RSSis to be specified in bytes, but glibc'sbits/resources.hclaims it was in bytes.
I'm confused by that sentence. You have a "but", but both cases are "bytes". What's the contradiction you are trying to point out? Ahhh -- I get it now. The man page says "pages".
Quoted 5 lines
My
suspicion is that the header is right, and the man page wrong. But of course, since the limit has no effect on Linux anyway, maybe this is not the most important thing to fix, but I thought I'd at least report the discrepancy here...
The man page is clearly wrong. From bits/resources.h we have:
[[
/* Largest resident set size, in bytes. <=====
This affects swapping; processes that are exceeding their resident set size will be more likely to have physical memory taken from them. */
__RLIMIT_RSS = 5,
#define RLIMIT_RSS __RLIMIT_RSS
]]
And in the kernel source file fs/proc/base.c, we have:
[RLIMIT_RSS] = {"Max resident set", "bytes"},As you note, the point is kind of moot, but the page should be fixed. Done!
Thanks for the report,
Michael
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html