RLIMIT virtual mem per user?

forcer (forcer@mindless.com)
Sun, 18 Oct 1998 21:13:43 +0200


Hi there.
I heard many complains lately about the lack of a limit for memory per
user, similar to RLIMIT_NPROC.
I really wonder why this isn't implemented yet. Forgive any possible
misconceptions, sadly i'm not a kernel-hacker, but i don't see
any big problems there:
- We add a field `cur_mem' to the user which holds the currently assigned
memory for that user
- On every call for new memory (mmap, sbrk, any more?) we check this field
plus the requested amount against the limit, and return an error if it's
over the limit.
Else it returns successfully as normal.
Since this really does not sound difficult to implement, and i don't
think it's in the kernel yet, where is my misconception? Where am i
thinking wrong?
-forcer

-- 
/* I used to have a drinking problem.  Now I love the stuff.              */
/* email: forcer@mindless.com      -><- www: http://webserver.de/forcer/  */
/* IRC: forcer@#StarWars (IRCnet)  -><- PGP/GPG: available on my website  */

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/