(original) (raw)
#include "bitmap.h" #include #include // try different values for NUM_BITS #define NUM_BITS 100 int main(int argc, char **argv) { printf("Allocating bitmap with %d bits\n", NUM_BITS); // add code to allocate a bitmap // this will test allocate_bitmap // dump_bitmap(bmap); // dump_bitmap will test get_bit printf("Setting every 7th bit in bitmap\n"); // add code for looping and setting every 7th bit in your bitmap // this will test set_bit // dump_bitmap(bmap); printf("Finding lowest unset bit\n"); // add code for finding lowest unset bit in your bitmap // this will test first_unset_bit printf("Un-setting every 7th bit\n"); // add code for looping and unsetting every 7th bit in your bitmap // this will test unset_bit // dump_bitmap(bmap); printf("freeing bitmap\n"); // add code for freeing bitmap // this will test free_bitmap return 0; }