Theory of OS - Memory Allocation
This lab has three purposes:
- For you to gain experience and comfort in directly managing memory.
- For you to demonstrate mastery of several "boundary tag"
algorithms for arena management.
- For you to evaluate these algorithms.
Boundary tag (prefix/suffix, implicit list) memory allocation is
described in class.
Some additional information and illustrations appear in:
I am providing you with a first-fit memory allocator named
"myAllocator" written in the
'C' programming language. MyAllocator can be used as a replacement
for malloc by linking it with "malloc.c"
Its "resizeRegion()" method (which allows
an allocated memory region to be increased) ineptly does
not consider
borrowing space from the successor block should it be free (this
is documented in resizeRegion's comments). For the first part of this
assignment, you should:
- Improve my implementation of resizeRegion().
- implement these altermative allocators:
- next-fit (name this method nextFitAllocRegion)
- best-fit (name this method bestFitAllocRegion)
You should test your modified memory arena mangers for proper
function, both as stand-alone allocators and as malloc() replacements.
I encourage you to share these test programs with each other.
My allocator is in the following tarball: myMalloc.tar. The files can be extracted to a
directory named "myMalloc"
using the command "tar xf myMalloc.tar"