[Penlin] Est code for memory manager (add initial and free in .cpp)