Implementing a Simple Pool Allocator in C
2025-01-09
This article details the implementation of a simple pool allocator in C. The author first presents a fixed-size pool implementation with O(1) time complexity for allocation and deallocation. This is then improved to allow dynamic resizing, preventing crashes due to exhaustion of the initial pool. The improved version cleverly uses linked lists to manage memory blocks, balancing performance with efficient memory usage.