Skip to content

rrozansk/Cheney-GC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cheney-GC

LICENSE RELEASES

An implementation of Cheney style garbage collection allowing the allocation of cons cells. These cells are capable of storing pointers to other cells or atomic data (represented as a tagged pointer or NULL). This allows the storage of any other data type's pointer or even possibly encoding the information itself directly into a pointer.

Furthermore, the heap has been encapsulated into a structure allowing multiple garbage collected heaps to exist simultaneously. Ultimately, this allows clean interaction through a well defined API. However, this could be useful for other reasons, one of which may be to maintain different memory pools if computing on threads. It is also possible, if permitted, for the heap to expand dynamically. Dynamic expansion can only happen when a collection fails in reclaiming memory or through the exposed 'resize' API call. For a more thorough explanation of all the libraries capabilities and exposed API's see the documentation.

Finally, table driven testing is deployed to ensure correctness and compatability while allowing expansion of test cases with minimal effort. A Makefile is included to help automate and run the test suite using the commands listed below. If any test fails or the program exits abnormally then the implementation is not compatible with the choosen system. Following the link above will lead you to directions for adding your own tests to the suite if so desired.

Prerequisites

  • gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 or equivalent C compiler
  • make

Getting Started

$ git clone https://github.com/rrozansk/Cheney-GC.git
$ cd Cheney-GC
$ make tests

Makefile Commands

$ make         # compile and execute the table driven tests, then cleanup
$ make all
$ make build
$ make tests
$ make clean   # remove all compiled and tmp files as well as the executable
$ make rebuild # clean and build
$ make tar     # create a tarball containing the core files of the project