Implementation of 3 simple Garbage Collection(GC) Algorithms. The Algorithms are:
To compile the program use the command:
make -f makefile all
Runing the code is done by using the code
./bin/mutator [--help] [--verbose[<1|2>]] [--mono] [--algo <1|2|3>] [--iterations <itererations>] [--heap-size <heap_size>] <threshold>
-
-hor--help: Display the usage message. -
-vor--verbose: Display extra messages as such:- no verbosity : Display only messages when the GC starts running and termination messages
- verbosity 1: Display the operations (add and remove nodes), as well as the number of blocks cleaned by the GC
- verbosity 2: Display all information, tree size, number of nodes to be cleaned in the tree, the tree and GC phases.
Note that: there is no space between the flag and the number of verbosity
-v1and-v2is correct,-v 1is not -
--mono: Use only 1 tree for all operations. -
-aor--algo: use x algorithm for GC,1: Mark & Sweep2: Mark & Compact3: Copy & Collect
the default value is 1, a.k.a., Mark & Sweep
-
-ior--iterations: the limit number of base operations (add and remove nodes from a tree), if you give a negative number it will be infinite, -
-sor--heap-size: Change the heap_size, the default is 1000 bytes, the heap-size should be a multiple of(sizeof(BisTreeNode) + sizeof(_block_header). -
threshold: a float like0.9, this is a required parameter
Run the following command to do cleanup:
make -f makefile clean