Garbage Collector Simulation for C++ using Mark and Sweep algorithm