Section 12.10: Segmented Virtual Memory (Frame 1)                     [     ][home][next]

Quite frankly, virtual memory as we have presented it earlier in this chapter is not easy to use. Operating systems, compilers and other programs need to "chunkify" memory in order to assign different protections, names and other properties to it. If virtual memory is just one huge chunk, this "chunkification" must be done by the program and is very hard to get right.

All modern computers break their virtual memory space into chunks called segments. Each segment represents one conceptual piece of memory. For example, a compiler assigns the heap to one segment, the run-time stack to another, the code to yet another and so forth. Each segment can have its own protection scheme so that the code can be readable, but not writable, while the stack and heap are both readable and writeable. Some segments may be write-only, such as a mailbox into which a program could write a message, but not read existing messages.