Memory management library jemalloc 5.3 has been released

The release of the jemalloc 5.4.0 memory management library has been announced, offering an alternative implementation of malloc functions optimized for reducing fragmentation and operating on multiprocessor systems. To address lock issues on multicore systems, jemalloc uses its own isolated memory allocation area for each CPU core, achieving linear scalability as the number of threads increases.

In June 2025, the project's author discontinued support and archived the jemalloc repository, but in March of this year, Meta resumed development, as they utilize jemalloc in their infrastructure. Originally, the library was developed for FreeBSD and has been used in this OS by default since 2005. The library's code is written in C and is distributed under the BSD license.

Among the changes:

  • The logic for filling and resetting the tcache (Thread Local Cache) has been simplified, as well as the memory allocation dispatching.
  • The page allocators PAC (Page Allocator Classic) and HPA (Huge Page Allocator) have been unified. The complex mechanism of indirect calls through vtable (PAI vtable) has been removed.
  • To simplify maintenance and expansion of platforms, all platform-dependent operations have been moved to separate header files.
  • The dispatching of mallctl commands has been simplified and the infrastructure for generating and outputting statistics has been redesigned.
  • A new flag, EXTENT_ALLOC_FLAG_PINNED, has been added to mark non-evictable memory mapping areas, such as HugeTLB pages, for prioritized reuse. New mallctl interfaces have been added for obtaining statistics on pinned memory usage: stats.pinned, stats.arenas..pinned, stats.arenas..extents..npinned, stats.arenas..extents.pinned_bytes, and stats.arenas..mutexes.extents_pinned.{counter}.
  • The contents of malloc statistics have been synchronized in readable and JSON formats.
  • Outdated parameters lg_tcache_nslots_mul, tcache_nslots_small_min, tcache_nslots_small_max, tcache_nslots_large, tcache_gc_delay_bytes, lg_tcache_flush_small_div, and lg_tcache_flush_large_div have been removed.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster