Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7753241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:00:31+00:00 2026-06-01T12:00:31+00:00

The man page for mlockall on my kernel 3.0 says mlockall() locks all pages

  • 0

The man page for mlockall on my kernel 3.0 says

mlockall() locks all pages mapped into the address space of the
calling process. This includes the pages of the code, data and stack
segment, as well as shared libraries, user space kernel data, shared
memory, and memory-mapped files. All mapped pages are guaranteed
to be resident in RAM when the call returns successfully; the pages
are guaranteed to stay in RAM until later unlocked.

and later says

Real-time processes that are using mlockall() to prevent delays on
page faults should reserve enough locked stack pages before entering
the time-critical section, so that no page fault can be caused by
function
calls. This can be achieved by calling a function that allocates a sufficiently large automatic variable (an array) and
writes to the memory occupied by this array in order to touch these
stack pages. This way,
enough pages will be mapped for the stack and can be locked into RAM. The dummy writes ensure that not even copy-on-write page
faults can occur in the critical section.

I understand that this system call can’t guess the maximum stack size that will be reached and thus is unable to lock pages for the stack. But why the first part of the man displayed above says that it’s also done for the stack ? Is there an error in this man page, or does it just mean that the locking is done for the initial stack size ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:00:33+00:00Added an answer on June 1, 2026 at 12:00 pm

    Yes, locking is done for the current stack pages, but not for all possible future stack pages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The man page says If the given process is running on a 64-bit VM,
I could use getpass() to get a password. However, the man page says: This
The man page of epoll_ctl() says about EPOLLPRI : There is urgent data available
Today, looking at the man page for open() , I've noticed this function is
The man page says: fgets() return s on success, and NULL on error or
I looked at bash man page and the [[ says it uses Conditional Expressions.
GNU xargs has option '-x'. The man page says: -x Exit if the size
The man page for Bash says, regarding the -c option: -c string If the
This is a code from Linux man page: #include <stdio.h> #include <stdlib.h> extern char
I can't access rails man page. How can I fix this? Thanks nuno@Houdini:~/workspace/depot_a$ man

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.