The jemalloc memory management library version 5.3.1 is now available.

Four years after the last update, the release of the jemalloc memory management library version 5.3.1 is now available, offering an alternative implementation of malloc functions optimized for reducing fragmentation and working on multiprocessor systems. To address lock issues on multicore systems, jemalloc uses an isolated memory allocation area for each CPU core, allowing for linear scalability as the number of threads increases.

In June 2025, the project author stopped maintenance and archived the jemalloc repository. However, a month ago, Meta, which uses jemalloc in its infrastructure, resumed development. The library was originally developed for FreeBSD and has been the default in that OS since 2005. The library's code is written in C and is distributed under the BSD license.

Among the changes:

  • The pvalloc function has been implemented, which may be useful for replacing the libc memory allocator.
  • In debug builds, a mode for detecting double calls to the free() function has been enabled. A parameter, debug_double_free_max_scan, has been added to configure the size of the stack for scanning.
  • An assembly option "--enable-pageid" has been added to tag mappings when using prctl with the PR_SET_VMA flag. Once enabled, the mapping can be tracked via /proc//maps.
  • The parameter "prof_bt_max" has been added to set the maximum stack depth for profiling.
  • An assembly option "--enable-force-getenv" has been added to use the regular getenv() function instead of the protected secure_getenv().
  • An assembly option "--disable-dss" has been added to disable the use of the sbrk() function.
  • The parameter "tcache_ncached_max" has been added to limit the number of elements in the thread cache.
  • The parameter "calloc_madvise_threshold" has been added to configure the use of the madvise kernel mechanism or the memset function for zeroing memory allocated through calloc.
  • An assembly option "--disable-user-config" has been added to disable loading settings from the /etc/malloc.conf file or the MALLOC_CONF environment variable.
  • The parameter "process_madvise_max_batch" has been added to limit the number of memory blocks for each madvise batch operation.
  • The parameter 'disable_large_size_classes' has been added to disable the new memory allocation size calculation algorithm, which reduces overhead when allocating blocks larger than 4 pages of memory.
  • The mallctl utility has gained options: opt.prof_bt_max, arena..name, thread.tcache.max, thread.tcache.ncached_max.write, thread.tcache.ncached_max.read_sizeclass, arenas.hugepage, and approximate_stats.active.

Source: opennet.ru

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