September 2008
Intermediate to advanced
280 pages
6h 31m
English
As you may know, dynamically allocated memory (DAM) is memory that a program requests from the heap with functions like malloc() and
calloc().[25] Dynamically allocated memory is typically used for data structures like binary trees and linked lists, and it is also at work behind the scenes when you create an object in object-oriented programming. Even the standard C library uses DAM for its own internal purposes. You may also recall that dynamic memory must be freed when you're done with it.[26]
DAM problems are notoriously difficult to find and fall into a few general categories:
Dynamically allocated memory is not freed.
The call to malloc() fails (this is easy to detect by checking the return ...
Read now
Unlock full access