Meta company* announced the resumption of development of the memory management library jemalloc, the repository of which was switched to archive mode in June last year. The jemalloc library offers an alternative implementation of the malloc functions, optimized to reduce fragmentation and work on multiprocessor systems.
It is noted that Meta realized the benefits of using jemalloc in its infrastructure and decided to resume work on the code of this library to reduce maintenance costs, modernize the code base, get rid of technical debt and adapt the allocator for new types of workloads and current equipment. Development will continue as an open project, co-developed with the community and welcoming outside contributions.
The jemalloc library was developed by Jason Evans (Jason Evans) in 2005 for FreeBSD 7.0, after which it was ported to NetBSD and integrated into Firefox. In 2009, the author of jemalloc went to work at Facebook, where this library was used in internal projects. In 2017, Jason left Facebook, and development was continued by the remaining Facebook team. After renaming to Meta, the company’s priorities changed, library development stalled, development focused only on internal needs, and the public code base degraded over time. Significant refactoring was required to keep the public library afloat, but Jason wasn’t ready to spend my time on this work and therefore 10 months ago I switched the repository to archive mode.
Among the plans that Facebook has planned to implement after reviving the project:
- Reducing accumulated technical debt, refactoring and cleaning the code base, improving the library to maintain efficiency, reliability and ease of use.
- Continued development of the HPA allocator (Huge-Page Allocator) to optimize the consumption of CPU resources due to more optimal use of large memory pages (transparent hugepage).
- Changes to improve memory efficiency related to improved packing of structures, caching and cleanup of freed memory blocks.
- Added