Managing Memory
Large portions of the errors in computer programs are byproducts of dynamic memory allocation. Dynamic-memory allocation enables a program to allocate as much memory as it needs on a case-by-case basis. When an application dynamically allocates memory, the operating system provides the requested memory as long as it is possible. The total memory allocated can be as large as the computer’s physical memory, virtual memory, and addressing conventions will allow. The theoretical limit to the amount of memory that can be allocated by one application on Mac OS X is approximately four Gigabytes.
The difficulty with dynamic-memory allocation is that the application and/or the operating system have to keep track of memory that has been ...
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.
Read now
Unlock full access