-
Book Overview & Buying
-
Table Of Contents
C++ Memory Management
By :
Our last example in this slightly strange chapter with examples of unusual memory management usage is concerned with the ways in which we can write standard C++ programs that deal with “exotic” memory. By “exotic,” we mean memory that requires explicit actions to “touch” (allocate, read from, write to, deallocate, and so on) and that differs from a “normal” memory block under the control of our program, such as the one used in the illustrative example of memory-mapped usage with placement new earlier in this chapter. Examples of such memory include persistent (non-volatile) memory or shared memory, but anything out of the ordinary will do, really.
Since we have to pick an example, we will write an example using a (fictional) shared memory block.
A little white lie…
It’s important to understand that we are describing a mechanism for memory that would normally be shared between...