The program requests the appropriate size memory as a memory pool through the system's memory allocation, and then the application's own allocation and release of memory can be done through this memory pool. Only if the memory pool needs to be dynamically expanded, the system needs to call the memory allocation function, and all other times the memory is mastered by the application.
From a thread-safe perspective, memory pools can be split into single-threaded and multithreaded pools
Single-threaded memory pool: Single-threaded memory pool is only used by one thread throughout the lifecycle, so there is no need to consider mutex issues
Multi-threaded memory pools: multithreaded memory pools may be shared by multiple threads, so you need to lock each time you allocate and free memory.
In general, single-threaded memory pools perform better, and multithreaded memory pools are more widely available.
Allocate memory cells from memory pools to points: fixed memory pool and variable memory pool
Fixed memory pool: The size of the memory cells allocated by the application each time from the memory pool has been determined beforehand, is fixed
Variable memory pool: the size of each allocated memory unit can vary on demand
Variable memory pools are more widely used and have lower performance than fixed memory pools.
http://blog.csdn.net/chexlong/article/details/7071922
Custom memory Pools (c + + needs to be mastered)