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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:28:12+00:00 2026-05-10T21:28:12+00:00

What is the memory model for concurrency in C++03? (And, does C++11 change the

  • 0

What is the memory model for concurrency in C++03?

(And, does C++11 change the memory model to support concurrency better?)

  • 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. 2026-05-10T21:28:12+00:00Added an answer on May 10, 2026 at 9:28 pm

    The C++ memory model is the specification of when and why physical memory is read/written with respect to C++ code.

    Until the next C++ standard, the C++ memory model is the same as C. In the C++0x standard, a proper memory model for multithreading is expected to be included (see here), and it will be part possibly of the next revision of the C standard, C1X. The current one is rudimentary:

    • it only specifies the behavior of memory operations observable by the current program.
    • it doesn’t say anything about concurrent memory accesses when multiple processes access the same memory (there is no notion of shared memory or processes).
    • it doesn’t say anything about concurrent memory accesses when multiple threads access the same memory (there is no notion of threads).
    • it offers no way to specify an ordering for memory accesses (compiler optimizations include code motion and recent processors reorder accesses, both can break patterns such as double checked initialization).

    So, the current state is: C++ memory operations are only specified when you have 1 process, with its main thread and don’t write code which depends on a specific ordering of variable read/writes and that’s it. In essence, this means that aside from the traditional hello world program you’re screwed.

    Of course, you’ll be prompt to add that ‘it works today on my machine, you can’t possibly be right’. The correct sentence would be ‘it works today on my machine with this specific combination of hardware, operating system (thread library) and compiler who know enough of each other to implement something which is somewhat working but will probably break at some point’.

    Ok ok, this is a bit harsh but hell, even Herb Sutter acknowledges that (just read the intro) and he is talking about all pre 2007 versions of one of the most ubiquitous C/C++ toolchain…

    The C++ standard committee attempts to come up with something which will address all those issues while still being less constraining (and thus better performing) than Java’s memory model.

    Hans Boehm has collected here some pointers to papers on the issue, both academic, and from the C++ committee.

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

Sidebar

Related Questions

Reading a few threads ( common concurrency problems , volatile keyword , memory model
So I was reading about the memory model that is part of the upcoming
C's memory model, with its use of pointer arithmetic and all, seems to model
Does python threading expose issues of memory visibility and statement reordering as Java does?
If a 32bit Operating System operated with a segmented memory model would their still
I want to implement a one-producer, multiple-consumer model with shared memory in Unix Producer:
What memory leak detectors have people had a good experience with? Here is a
What memory leak detection tools are available for use with open source C/C++ on
I have a .z80 memory dump. How do I reverse engineer it? What do
I'm writing the memory manager for an application, as part of a team of

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.