[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
No Subject
I am leiyin, a software engineer in china, beijing. I am interested
in Linux memory management these day. Since I find an ordinary user
can easily occupy all the memory available. Though I don't think this is
a bug. I wonder whether I can control how much memory a user can occup
,including swap space, or not.
For example, this program occupy.c
compile: cc -o occupy occupy.c
#define BLOCK 100000
#define PGSIZE 4096
char *p[BLOCK];
main()
{
int i,j;
for(i=0;i<BLOCK;i++)
{
for(j=0;j<PGSIZE;j++)
p[i][j] = 0;
}
sleep(100000);
}
when I run occupy. My linux system with 32 RAM soon show
Out of Memory. And any other users cannot login and work normally.
Especially in AS400 OS/400 one can distribute a fixed size physical memory
(pool) for a subsystem. If Linux can do this( I mean a fixed size memory for
a user not subsystem), I think linux will become more lovely.
Address:leiyin_linux@163.net
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
- Follow-Ups:
- Re: none
- From: ebiederm+eric@ccr.net (Eric W. Biederman)