lkml.org 
[lkml]   [2001]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Removing an executable while it runs
Date
From
twalberg@mindspring.com said:
> mlockall() only locks those pages that are **currently** paged in, or
> optionally those that will be paged in in the future. Unless you have
> a way to make sure that all pages of the binary are actually in memory
> before you call mlockall(), this gains you nothing.

No, mlockall will page in the entire process before returning if you ask it to.

See this snippet in mlock_fixup:

if (newflags & VM_LOCKED) {
pages = -pages;
make_pages_present(start, end);
}

VM_LOCKED comes in through the mlockall system call.

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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