lkml.org 
[lkml]   [2000]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Memory management...
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/

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