This preview shows page 1. Sign up to view the full content.
Unformatted text preview: . Naive programmers often incorrectly assume that virtual memory is an unlimited resource. In fact, the total amount of virtual memory allocated by all of the processes in a system is limited by the amount of swap space on disk. Good programmers realize that virtual memory is a ﬁnite resource that must be used efﬁciently. This is especially true for a dynamic memory allocator that might be asked to allocate and free large blocks of memory. There are a number of ways to characterize how efﬁciently an allocator uses the heap. In our experience, the most useful metric is peak utilization. As before, we are given some sequence of Ò allocate and free requests Ê¼ Ê½ Ê Ê ½
Ò 528 CHAPTER 10. VIRTUAL MEMORY
If an application requests a block of Ô bytes, then the resulting allocated block has a payload of Ô bytes. After request Ê has completed, let the aggregate payload, denoted È , be the sum of the payloads of the currently allocated blocks, and let À denote the current (monotonically nondecreasing) size of the heap. Then the peak utilization over the ﬁrst r...
View Full Document
This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.
- Spring '10
- The American