CSE 303, Autumn 2009
Homework 7: memory allocation
Due: December 13,
2009, at 11:30PM
100 points
Your assignment is a slight variation of an assignment
from last Spring's 303. The objectives are: (a) to help you
better understand explicit memory management; (b) to give you another
substantial programming experience in C (to reinforce your knowledge of
C and your experience in building C programs); (c) to give you specific
experience in some low-level aspects of C; and (d) to give you some
experience in the design-level decisions that go into breaking programs
into pieces and defining the interfaces between the modules.
The variations from the linked assignment are:
- You may choose to do this assignment alone or in groups of
two. (There are tradeoffs to both approaches, of course.)
If you are working in a pair, let the staff know by Friday (December 4)
at noon; we'll set up a group for you (if you need a new one).
- You are not required to use an SVN repository (although we
recommend this strongly for both individuals and pairs).
- The extra credit is not applicable -- if you want to do this
extra work, go ahead, but it's for you only: we won't look at it or
grade it.
- The due date is different: this is due Sunday December 13, 2009,
at 11:30PM (yes, I got enough email to move the time to PM).
- Details about submission will come from the TAs later on.
A few other things.
- This is a pretty big assignment (note that it was the
next-to-last assignment last spring, but it's our last assignment), so
don't wait to start -- if there are problems and/or confusions, finding
out about them earlier will be far better. Read it carefully and
ask questions now.
- The assignment says: "Your code will simulate a heap of memory to
be dynamically allocated to client programs upon request. An important
concept to understand about this assignment is that most of your code
is not in itself a complete C program. Instead, it is a library of
functions that others could build upon to write their own C programs.
Your library has functions for allocating memory. Basically, you are
re-implementing crappier versions of malloc and free. Various client
programs could include your library in with their code and could call
your functions to perform dynamic memory allocation. Therefore when
working on this assignment, you must think about the client's view
versus your own internal view of your code." One thing this means
is that, after you're done, you could (with small changes to the names
of functions) use your solution to HW7 to do the memory allocation for
HW4, HW5, and HW6. That is, you can be part of your old
assignments' run-time system!
- I will be out of town on Tuesday December 8, so no office hours
that day -- but I'll try to add in some one-time office hours that week.