knaxuslearn · build · ship

Projects / Memory allocator / Before you start

Before you start

You need a C++ compiler that supports C++20 (g++ 11 or newer, or clang 14 or newer) on Linux or macOS. Check yours:

g++ --version

Every listing and command in this project was run with g++ 13.3 on x86-64 Linux. Timings and some sizes will differ on other machines (on Apple silicon, for example, the numbers change but the ideas do not). Make a folder and put each phase's files in it:

mkdir allocator && cd allocator

Compile every program with the same flags, and keep the warnings on, because they will save you hours:

g++ -std=c++20 -O2 -Wall -Wextra -o name name.cpp