Re: Memory management...

From: Tigran Aivazian (tigran@veritas.com)
Date: Wed Aug 02 2000 - 16:10:16 EST


On Wed, 2 Aug 2000 ckg@altavista.net wrote:
> data[i] = malloc(mem * 1024);

the interesting bit in your program is that it allows normal user to
bypass RLIMIT_DATA resource limit because MAP_PRIVATE|MAP_ANONYMOUS
memory mappings do not honour RLIMIT_DATA resource limit under Linux.

they do however honour RLIMIT_AS (address space) so just use setrlimit(2)
to arrange for your program to fail as expected... it works for me under
2.4.0-test6-pre1.

Hope this helps,
Tigran

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



This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:09 EST