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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:47:24+00:00 2026-05-16T18:47:24+00:00

The man page on fork() states that it does not copy data pages, it

  • 0

The man page on fork() states that it does not copy data pages, it maps them into the child process and puts a copy-on-write flag. Is that behavior:

  • consistent between flavors of Linux?
  • considered an implementation detail and therefore likely to change?

I’m wondering if I can use fork() as a means to get a shared read-only memory block on the cheap. If the memory is physically copied, it would be rather expensive – there’s a lot of forking going on, and the data area is big enough – but I’m hoping not…

  • 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-16T18:47:25+00:00Added an answer on May 16, 2026 at 6:47 pm

    Linux running on machines without a MMU (memory management unit) will copy all process memory on fork().

    However, those systems are usually very small and embedded and you probably don’t have to worry about them.

    Many services such as Apache’s fork model, use the initialize and fork() method to share initialized data structures.

    You should be aware that if you are using languages like Perl and Python that use reference-counted variables, or C++ shared_ptr’s, this model will not work. It will not work because as the reference counts are adjusted up and down, the memory becomes unshared and gets copied.

    This causes huge amounts of memory usage in Perl daemons like SpamAssassin that attempt to use an initialize and fork model.

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

Sidebar

Related Questions

From the XDrawString man page it seems that it aceepts signed 32 bit x
From the man page on git-merge, there are a number of merge strategies you
I'm looking at the poll() man page , and it tells me the behavior
Per man pages, snprintf is returning number of bytes written from glibc version 2.2
How do I access specific sections of man pages?
For example: man(1) , find(3) , updatedb(2) ? What do the numbers in parentheses
For a poor man's implementation of near -collation-correct sorting on the client side I
I'm just a one-man software shop, and I currently have an MSDN subscription. It
I have a problem with scandir() : The manpage contains this as prototype: int
I am trying to use timerfd_create and timerfd_settime under Debian Linux lenny. The manpage

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.