Due: Thu, 24 Oct 2013, 10pm
70 pts, 7% of total grade.
Design and implement a set of functions to manage a heap (free store) in C++.
For all projects, the minimum requirement for getting a non-zero grade is to write standard-compliant C++ (-std=c++0x) and to satisfy all of the requirements in the table below, including the precise naming of all the files.
You can earn 5 bonus pts, if you work with a partner using pair programming and vouch for the fact that you worked on the project together for more than 75% of the time.
Only one solution must be turned in for the pair. If two solutions are turned in, there will be a 10% penalty, and the later one will be graded.
Bonus pts will not increase the total score beyond the max score.
You may not use new, delete, malloc() or free(). You may use the STL.
These are additional descriptions of the underlying math:
Set up a private Git repository at GitHub, named cs371p-allocator.
Invite the grader to your repository. Commit at least 5 times. Commit once for each bug or feature. If you cannot describe your changes in a sentence, you are not committing often enough. Write meaningful commit messages and identify the corresponding issue in the issue tracker (below). Create a tag for important milestones (e.g. without a cache, with a lazy cache, etc.). Create a log of the commits. Push frequently. It is your responsibility to protect your code from the rest of the students in the class. If your code gets out, you are as guilty as the recipient of academic dishonesty.
The GitHub repository comes with an issue tracker.
Create an issue for each of the requirements in this table. Create an issue for each bug or feature, both open and closed. Describe and label each issue adequately. Create at least 10 more issues in addition to the requirements in this table.
Write unit tests before you write the code. When you encounter a bug, write a unit test that fails, fix the bug, and confirm that the unit test passes. Write at least an average of 3 unit tests for each function. Tests corner cases and failure cases. Name tests logically. You must use Valgrind.
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.
Use Doxygen to document the interfaces.
The above documentation only needs to be generated for Allocator.h. Comment each function meaningfully. Use comments only if you need to explain the why of a particular implementation. Choose a coding convention and be consistent. Use good variable names. Write readable code with good indentation, blank lines, and blank spaces.
Rename "makefile.c++" to "makefile".
Fill out the Google Form and submit the ZIP file to Turnin.
|Name||GitHub ID||GitHub Test Repository||Turnin ID||Turnin Project Folder||Google Form|
|Reza Mahjourian||rezama||cs371p-allocator-tests||reza||cs371ppj3||Google Form|
Submit a single ZIP file, named Allocator.zip, to the grader's Turnin account, with the following files: