In C and C++, it can be very convenient to allocate and de-allocate blocks of memory as and when needed. This is certainly standard practice in both languages and almost unavoidable in C++. However, ...
The following excerpt is from chapter 3, User-Level Memory Management, of Arnold Robbins’ book Linux Programming by Example: The Fundamentals, Prentice Hall PTR; (April 12, 2004), used with permission ...