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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:33:15+00:00 2026-06-13T20:33:15+00:00

I want to share memory between processes using mmap(). mmap() can be applied on

  • 0

I want to share memory between processes using mmap(). mmap() can be applied on a regular file, or on a POSIX shared memory file (shm_open). But what is the difference? The difference is surely not whether the disk is accessed:

  • Frequently and recently accessed regular files live in the filesystem cache/buffer so their contents are already in memory.
  • Even when using mmap() with shm_open(), that memory region may be swapped out when the system is under high memory stress.
  • 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-13T20:33:16+00:00Added an answer on June 13, 2026 at 8:33 pm

    One difference is that although shared memory might be written to disk, it will never be written to disk permanently. If you create a normal file, then it persists across reboots. If you create a shared memory object, it doesn’t. It behaves quite like a temporary file in that respect.

    Another difference is that “It is unspecified whether the name appears in the file system and is visible to other functions that take pathnames as arguments“. So, although a shared memory object has a file-like path, it need not actually appear in the filesystem.

    Really, both of those differences are about decoupling from the filesystem. Files and shared memory objects are both bags of bytes which can be read and written, but files differ in that they are persisted in the filesystem.

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

Sidebar

Related Questions

I want to share some objects between multiple programs using shared memory. I've found
I want to share some memory between different processes running a DLL. Therefore i
I want to share memory between two processes. One way I know is to
I want to use shared memory across processes and wanted to use the robust
I want to share a dictionary between my processes as follows: def f(y,x): y[x]=[x*x]
Is it possible to create a memory pool shared between processes (for example from
I'm trying to use CreateFileMapping and OpenFileMapping to share memory between processes. This isn't
I'm thinking to use MemoryMappedFile to share memory between multiple processes. While one process
I want to share(and give control of) my Ubuntu 12.04 desktop to my brother(using
I want to share my experience of using maven through a proxy. You would

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.