Type Based Allocation
summary
A compile-time type-based allocator builds a tree of pools, unions and segment allocators that only supports a fixed set of sizes to cut fragmentation and improve cache locality. Implementation uses C++ TMP, CRTP and bitmap pool bitmaps for occupancy, plus a greedy compile-time algorithm that scores pool-size pairings; example on an octree with 24/16/64-byte nodes yields smaller unions and fewer wasted bytes. Works as a proof of concept but hits compiler instantiation limits, cannot plug into std containers easily, and a lookup routine may be undefined behavior so not production-ready.
AI-written summary · about
chapters (34)
- 0:00Introduction
- 0:39Who am I
- 1:16Why allocators
- 2:18Common solutions
- 2:59Single size
- 4:27Fermentation
- 6:03Types
- 8:19Example
- 9:14Use Case
- 10:49Assumptions
- 12:13HighBase Allocation
- 15:17Components
- 16:32Structure
- 19:26Inheritance
- 22:32Type Function
- 22:53Allocator
- 24:00Locator
- 24:52Union
- 25:42Heritage
- 27:04Poles
- 28:02Head Pointer
- 28:40A Locator Type
- 31:29Heap Locator
- 33:17Limitations
- 34:13Simple Union
- 47:16Communication Example
- 47:39Combination Algorithm
- 49:04Polymorphic Alligator
- 49:18Destructor
- 49:48Residual Functions
- 50:09Stateful Matter
- 50:58Stateful Massive Boring
- 51:16Optimal Out Carrier
- 51:58Practicality
