O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Program Memory Model

Mac OS X processes have a conceptual memory model, where memory is divided into space for the executable code, a stack, a heap, and other bits and pieces, as shown in Figure 7.2:

Figure 7.2  Unix program memory model

Unix program memory model

Text Segment

The executable program code lives here. At program launch time, the code is mapped into memory from the executable on disk as read-only pages. Since these pages are read-only, they can be easily shared among multiple processes, so the pages only have to appear in physical memory once and can still be shared among multiple users. They can, of course, appear multiple times in the virtual memory of other ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required