We demonstrate that general-purpose memory allocation involving many threads on many cores can be done with high performance, multicore scalability, and low memory consumption. For this purpose, we have designed and implemented scalloc, a concurrent allocator that generally performs and scales in our experiments better than other allocators while using less memory, and is still competitive otherwise. The main ideas behind the design of scalloc are: uniform treatment of small and big objects through so-called virtual spans, efficiently and effectively reclaiming free memory through fast and scalable global data structures, and constant-time (modulo synchronization) allocation and deallocation operations that trade off memory reuse and spatial locality without being subject to false sharing.

Publications

M. Aigner, C.M. Kirsch, M. Lippautz, and A. Sokolova. Fast, multicore-scalable, low-fragmentation memory allocation through large virtual memory and global data structures. In Proc. International Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA). ACM, 2015. [ DOI | PDF ]

M. Aigner, C.M. Kirsch, M. Lippautz, and A. Sokolova. Fast, multicore-scalable, low-fragmentation memory allocation through large virtual memory and global data structures. CoRR, abs/1503.09006, 2015. [ arXiv ]

Code

All code is released under a BSD style license and can be found on GitHub. Consult the README file for instructions on how to build and integrate scalloc.