--Boundary_(ID_+RGIpzguG5sPYKSyu1lxNQ)
Content-type: TEXT/PLAIN; charset=US-ASCII
Content-transfer-encoding: 7BIT
Hello,
I'm not able to set user resource limits (with ulimit under bash or
limit under tcsh), am I doing something wrong or does linux not support
limitting maximun memory/filesize/descriptors/... in a per-user basis?
If not any user could make the system unusable using for example
some kind of memory consumer program as the one attached.
- german
<>-------------------------------------+-----------------------------------<>
One O.S. to rule them all, | German Gomez Garcia
One O.S. to find them. | german@pinon.ccu.uniovi.es
One O.S. to bring them all |
and in the darkness bind them. | "Wur Qanar Wur Stilor Wur Kas"
<>-------------------------------------+-----------------------------------<>
--Boundary_(ID_+RGIpzguG5sPYKSyu1lxNQ)
Content-id: <Pine.HPP.3.91.990926040153.26630B@pinon.ccu.uniovi.es>
Content-type: TEXT/PLAIN; name=petalo.c; charset=US-ASCII
Content-description:
Content-disposition: attachment; filename=petalo.c
Content-transfer-encoding: 7BIT
#include <stdio.h>
#include <stdlib.h>
main()
{
void *buf[2048];
long int mem = 0x3000000;
int i = 0;
for(;;)
{
buf[i] = malloc(mem);
if (buf[i] == NULL)
mem /= 2;
else
{
printf("%lX\n", mem);
memset(buf[i], i, mem);
i++;
}
if(mem < 1)
{
sleep(1);
mem = 0x20000;
}
}
return 0;
}
--Boundary_(ID_+RGIpzguG5sPYKSyu1lxNQ)--
-
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/