This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS 3214, Fall 2011 Malloc Lab: Writing a Dynamic Storage Allocator Due date: Nov 2, 2011, 11:59pm 1 Introduction In this lab you will be writing a dynamic storage allocator for C programs, i.e., your own version of the malloc , free and realloc routines. You are encouraged to explore the design space creatively and implement an allocator that is correct, efficient, and fast. 2 Logistics You may work in a group of up to two people. Any clarifications and revisions to the assignment will be posted on the forum. 3 Hand Out Instructions We will again be using SVN for this project. If you are working in the same group as in the previous project, you will be using the same SVN repository. If your group composition changed, please notify us so we can assign a new group id and set up a new directory. The provided code is in the directory cs3214/malloclab/malloclab-cs3214-fall11. One team mem- ber should import this directory using the following commands cd cs3214/malloclab/malloclab-cs3214-fall11 svn import . \ https://cvs.cs.vt.edu/cs3214/fall11/<your group id>/malloclab \--message "Initial import" Both team members can then check out the directory, or simply update the existing repository, which would create a sibling directory malloclab next to the directory esh created in project 3. The malloclab directory contains a number of files. The only file you will be modifying and hand- ing in is mm.c . You should do so by invoking make handin from a lab machine. The mdriver.c program is a driver program that allows you to evaluate the performance of your solution. Use 1 the command make to generate the driver code and run it with the command ./mdriver -V . (The-V flag displays helpful summary information.) We will compile the allocator in 32-bit mode and use the 32-bit model. Consequently, each pointer is represented as a 32-bit value, and the integer types int, long, and size t are each 32 bits wide. Looking at the file mm.c youll notice a C structure team into which you should insert the re- quested identifying information about the one or two students comprising your programming team. You may choose the team name freely. Please use your SLO (@cs.vt.edu) accounts for the email addresses. Do this right away so you dont forget. When you have completed the lab, you will hand in only one file ( mm.c ), which contains your solution. Keep in mind that any changes you may have made to any of the other files will not be considered when grading! We again provide the doubly-linked list implementation youve already used for the shell assignment, should your implementation need it. 4 How to Work on the Lab Your dynamic storage allocator will consist of the following four functions, which are declared in mm.h and defined in mm.c ....
View Full Document
This note was uploaded on 12/31/2011 for the course CS 3214 taught by Professor Staff during the Fall '11 term at Virginia Tech.
- Fall '11