Object-Oriented Programming

CS371p: Fall 2009: 54850

5. Allocator

Design and implement a set of functions to manage a heap (free store).

Use a first fit strategy.

Input


There is no input.

Ouput


There is no output.

Correctness (10 pts)
[no partial credit and required for any other credit]


Your program must pass the provided unit tests.

Additional Correctness (10 pts)


Your program must pass additional unit tests created by the grader.

Testing (10 pts)


Create a set of additional unit tests in TestAllocator.h and TestAllocator.out.

Use Google Groups to reach consensus on the tests.

You must use Valgrind and get no errors.

Design (5 pts)


You must not use new or delete or malloc() or free().

You must use assert() to check pre-conditions, post-conditions, argument validity, return-value validity, and invariants.

Worry about this last, but your program should run as fast as possible and use as little memory as possible.

Documentation (5 pts)


You must edit Allocator.txt with a plain-text editor. Do not use Word!

You must use Google Project’s wiki to document your implementation.

You must use Doxygen to document your interfaces:

  • variables
  • functions
  • classes
  • methods
  • parameters (@param)
  • returns (@return)
  • exceptions (@throws)

You must use C-style (/*…*/) or C++-style (//…) comments to document implementations.

Follow any coding convention, but be consistent. Use good variable names. Write readable code with good indentation, blank lines, and blank spaces.

Source Control (5 pts)


You must use a source control system to track your changes.

Bug Tracking (5 pts)


You must use Google Project’s bug tracker to manage your bugs.

Submission


Every individual must submit the following to Turnin:

Type Name Description
overview Allocator.txt Overview of the submission.

Every pair must submit the following to Turnin:

Type Name Description
documentation html Documentation of the program,
produced by Doxygen.
driver main.c++ Definition of the function main().
implementation Allocator.h Definition of the Allocator functions.
tests TestAllocator.h Definition of the CppUnit tests.
output TestAllocator.out Output of the program,
CppUnit tests with Valgrind.
source control SourceControl.log Log of the source control system commits.

Every individual must post the following to their UT Blog:

  • predicted number of hours to complete
  • actual number of hours to complete
  • TestAllocator.out (as a page)