project2 - Project 2-CMPSCI 377 (Spring 2008) Worth: 15...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Project 2--CMPSCI 377 (Spring 2008) Worth: 15 points 1 Overview The purpose of this project is to acquaint you with how memory allocators provide virtual memory to programs. You will (1) write a BiBOP-style memory allocator, which you will compile into a shared library that can be used with any existing program. You will need to implement the basic malloc API (malloc, free, calloc, realloc). You will then (2) compare your allocator against the system allocator, comparing performance and space consumption for two benchmarks we will provide. The results of this performance and space allocator 2 Allocator 2.1 Input Your allocator will run as a layer between any program and the operating system. The program will attempt to alllocate heap memory using calls such as "new", "delete", "malloc", and "free". These calls will be handled by your layer, which will in turn request memory from the operating system, using "mmap". The input to your program will be a sequence of calls to malloc and free, or new and delete. These calls will be intercepted by a "shim" layer that will then call your allocator. 2.2 Output Your allocator should not create any output. If your allocator creates output the autograder will mark your solution as incorrect. 2.3 Implementing the Allocator A BiBoP allocator manages memory in chunks of one page in size. The allocator must use segregated lists of different size objects (free and allocated). The objects themselves will not contain any headers–all metadata must appear at the start of each page, in a BibopHeader. Your allocator will allocate memory in units of pages (4K) for small objects (segregated by different sizes, in powers of two from 8 to 1024), with all object metadata (like the size of all these objects) placed at the start of each page. Each page (4K chunk) should only
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/08/2008 for the course CS 377 taught by Professor Corner during the Spring '08 term at UMass (Amherst).

Page1 / 4

project2 - Project 2-CMPSCI 377 (Spring 2008) Worth: 15...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online