This project was created as part of my Low Level Games Programming module in order to learn advanced memory management skills such as memory pools, heaps, and memory tracking systems. It was also created to learn the threading systems in C++11 and learning how to use Unix processes. The program given to us at the start of the module featured no memory management or multithreading and was also heavily unoptimized. It produced a 4 second long video of raytraced spheres shrinking and growing each frame. This originally was a 39 second process to generate these 100 frames and was then bought down to 6 seconds with the use of file IO improvements, multithreading and memory pools to reduce dynamic allocations throughout the programs runtime.

Built in C++14

Built in 3 months. October 2021 - January 2022

Features

Advanced Memory Management

  • Memory Pools
  • Heaps
  • Heap Integrity Checks
  • Overriding new and delete operators
  • multithreading using std::thread for windows and Unix processes for Linux builds

    Multi-Platform Compatibility

  • This program was originally built for Windows and then ported to Linux in order to learn how multithreading works on different platforms
  • Tweets

    Challenges

    Implementing Memory Management tools. This was my first time implementing memory tracking tools into a project and as such involved learning a lot of new features of the C++ language, such as using malloc, free, and memset.

    Implementing Multithreading. While I have done some multithreaded programming in the past I have never done multithreading at this scale before where it was crucial that there would be no problems with race conditions or synchronicity.

    Optimizing file IO. When I started this project I had no idea how slow and inefficient utilising string streams and ofstreams were when compared to using C style strings and C file IO. Changing the program to write files using these was a challenge at first as it involved learning a lot of new lower level syntax, eventually the C style file IO did work but it did take a long time to implement.