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 6380763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:18:35+00:00 2026-05-25T02:18:35+00:00

Possible Duplicate: Can I tell Linux not to swap out a particular processes' memory?

  • 0

Possible Duplicate:
Can I tell Linux not to swap out a particular processes' memory?

I want to allocate a chunk of memory in Linux and be sure that it will get no #GP or #PF faults. Regarding #GP, it’s my responsibility as a programmer to ensure that I do not exceed any bounds. However, #PF are the the responsibility of the OS, since it can choose whether or not to evict a page.

I imagine that if I use the same page frequently, the OS will be smart enough not to evict it. However, if I want to allocate a large block of memory, then it’ll take me a while to reach some of the pages, and I don’t want the OS to evict it in the meanwhile.

Is there any way to tell Linux to keep a page present so that I never get a page fault?

Note: This is similar to to the question How can I tell Windows to keep a page and not evict it? except that this one is about Linux

  • 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-05-25T02:18:36+00:00Added an answer on May 25, 2026 at 2:18 am

    I think you are looking for mlock.

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

Sidebar

Related Questions

Possible Duplicate: Where can I learn web programming from start to mastery? I want
Possible Duplicate: Show line number in exception handling Can someone please tell me how
Possible Duplicate: Can a Bash script tell what directory it's stored in? Is there
Possible Duplicate: Obj-C, how can I append one NSMutableArray to another? I want to
Possible Duplicate: Special (magic) methods in Python who can tell me what can call
Possible Duplicate: How can I tell whether an element matches a selector? I've been
Possible Duplicate: How can you programmatically tell an HTML SELECT to drop down (for
Possible Duplicate: Problem installing my Android apps Any body can tell me how can
Possible Duplicate: gcc-4.2 failed with exit code 1 iphone Can anybody tell what does
Possible Duplicate: Why and When to use node js? Can someone tell me why

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.