Translation lookaside buffer Simulation in C++