CSCE 434 Lecture 30

From Notes
Jump to navigation Jump to search

« previous | Monday, November 4, 2013 | next »

Lecture Slides

Memory Allocation

When asked to allocate more than one page, the pages do not have to be contiguous. They just appear to the program to be contiguous in virtual address space.

Common sizes () and unusual sizes (anything else).

  • Usually between and
  • Use separte pools for each size
  • Use first fit method for each of these pools


Heap Management

Collecting Allocator

  • automated free()
  • if there are no pointers to a block, then that block is considered unused
  • called "garbage collection" (GC)
  • Only run GC when memory runs low