Looks like you've got it all wrong.
ulimit -m operates in units of 1024 pages each:
Yes. But one page can be more than 1024. In my case - 4096. If I set
ulimit -m 1024, one user can get RSS (in top) 1500 kBytes. I hit this
when my server was drown in swapping, when users ulimits were set to
half RAM. One user had eat all memory (as top had show) and I had check
manuals (setrlimit, etc).
Man bash says: "Values are in 1024-byte increments, except for -t,
which is in seconds, -p, which is in units of 512-byte blocks, and -n
and -u, which are unscaled values". So I exepect -m operates "1024-bytes
increments"... /etc/security/limits.conf also says "- rss - max resident
set size (KB)" - not true actually.
--
With respect
Serg.