Skip to Content
C++ High Performance
book

C++ High Performance

by Viktor Sehr, Björn Andrist
January 2018
Intermediate to advanced
374 pages
9h 53m
English
Packt Publishing
Content preview from C++ High Performance

Shared memory

Threads created in the same process share the same virtual memory. This means that a thread can access any data that is addressable within the process. The operating system, which protects memory between processes using virtual memory, does nothing to protect us from accidentally accessing memory inside a process that was not intended to be shared among different threads. Virtual memory only protects us from accessing memory allocated in other processes than our own.

Sharing memory between multiple threads can be a very efficient way to handle communication between threads. However, sharing memory in a safe way between threads is one of the major challenges when writing concurrent programs in C++. You should always strive to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ High Performance - Second Edition

C++ High Performance - Second Edition

Björn Andrist, Viktor Sehr
Advanced C++

Advanced C++

Gazihan Alankus, Olena Lizina, Rakesh Mane, Vivek Nagarajan, Brian Price
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
C++ Cookbook

C++ Cookbook

D. Ryan Stephens, Christopher Diggins, Jonathan Turkanis, Jeff Cogswell

Publisher Resources

ISBN: 9781787120952Supplemental Content