lkml.org 
[lkml]   [1998]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RLIMIT virtual mem per user?
On Sun, Oct 18, 1998 at 09:13:43PM +0200, forcer wrote:

> 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.

It's a 2.3.x thing. AlanC has already had a crack at this of sorts
(the beancounter stuff).

> 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

What if that memory is a shared RO page, mmap from a file owner by
someone else?

> - 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.

We also need to charge for memory outside of this. Memory used in
sockets and pipes for example.



-cw

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.029 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site