What is Hoard and why use it?
masterHoard is a fast, scalable, and memory-efficient memory allocator designed for multithreaded programs running on multiprocessors and multicore CPUs. It serves as a drop-in replacement for malloc.
Hoard addresses three primary issues found in many standard allocators:
- Contention: It eliminates the bottleneck where multiple threads serialize while attempting to allocate or deallocate memory.
- False Sharing: It is designed to prevent threads on different CPUs from sharing the same cache line, which can significantly degrade performance.
- Blowup: It provides provably bounded memory consumption, preventing the common issue where memory usage multiplies by the number of CPUs in a multithreaded environment.