lkml.org 
[lkml]   [2000]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: can't mlockall() more than 128MB, is this a kernel limitation?
Date
On Tue, 08 Aug 2000, David Hinds wrote:
> Actually, since the present test is only done on the number of pages
> to be locked at the time of the system call, it is nearly worthless.
> You can already mlock more pages than the "limit": just do mlockall()
> with MCL_FUTURE, and allocate your big block of memory afterwards.

Ah, thanks,
I always wondered what malloc() would return if at program start we issued an
mlockall(MCL_CURRENT|MCL_FUTURE) and then started to malloc() large chunks
of mem until we ran out of memory.
In theory malloc() should fail if the OS cannot guarantee that the the memory
resides in physical ram. (even if enough VM is available)
Is this actually true ?

(A simple test app could answer this, but I haven't tried yet)

Benno.


-
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:58    [W:0.053 / U:2.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site