std::allocator

Historically stl::allocator were though to overcome issue with near and far pointer on intel archictecture and share a lot of issue from this time. Andreid revisit how they should have been implemented. - CppCon

which gives interface:

  • allocate
  • owns
  • deallocate
  • deallocateAll

Manipulating block made of (addr, size).

Danger:

  • Freelist: are adversed to cache and can eat all memory.

See also

Written on July 11, 2018, Last update on March 16, 2025
c++-memory memory profiler blog-code