-
Book Overview & Buying
-
Table Of Contents
C++ Memory Management
By :
We are progressing in our exploration of memory management with C++. In Chapter 7, we explored the various syntactic ways in which one can overload operator new() and operator delete() (as well as their array counterparts), and in Chapter 8, we wrote an actual, real-life example (a memory leak detector) relying on the capacity to write such overloads. It’s a nice start, showing concretely that this knowledge has practical uses, but you might (rightfully) wonder what else we can do when controlling memory management facilities.
This chapter will be slightly different from the others. What we will do here is present a non-exhaustive set of ways in which one can benefit from taking control of the memory allocation functions of C++. More precisely, we will show the following:
new can let us drive memory-mapped hardware efficientlynothrow version of operator new()