No description
Find a file
Slobodan Predolac ab4c178444 Consolidate prof_* and tcache_* header splits
Each of these components had a four-way split (_types, _structs,
_externs, _inlines) that dates back to the old "include each section
multiple times from a master file" pattern. With Step 2's edata <->
prof_types decoupling, merging _types + _structs + _externs into one
header per component no longer risks recreating an include cycle.

- prof.h replaces prof_types.h + prof_structs.h + prof_externs.h.
- tcache.h replaces tcache_types.h + tcache_structs.h + tcache_externs.h.

prof_inlines.h and tcache_inlines.h are kept separate: prof_inlines.h
sits at the bottom of the dependency layering, and tcache_inlines.h's
include of arena_externs.h is the asymmetric cycle-breaker that keeps
the arena<->tcache symbol cycle from becoming an include cycle.

Two surprises required adjustments beyond a straight concatenation:

1. te_prof_sample_event_lookahead was a JEMALLOC_ALWAYS_INLINE function
   defined in prof_externs.h, but its body calls tsd_thread_allocated_*
   accessors that only exist after tsd inlines are loaded. The original
   layering hid this because prof_externs.h was only included near the
   bottom of jemalloc_internal_includes.h. After consolidation,
   tsd_internals.h's includes pull prof.h in earlier, exposing the
   ordering dependency. Moved the inline to prof_inlines.h (where
   inline definitions belong anyway) and left only the related extern
   in prof.h.

2. base.h was included from prof_externs.h and tcache_externs.h purely
   for base_t * pointer arguments on a couple of declarations. Carrying
   that include into the merged prof.h / tcache.h would pull ehooks.h
   (-> tsd.h) into tsd_internals.h before tsd_internals.h finishes
   declaring its tsd accessors. Replaced with a forward declaration of
   base_t in each merged file.

Similarly, tsd_internals.h's prior #include of prof_types.h becomes a
forward decl of prof_tdata_t (the only prof symbol it references, and
only as a pointer), and large.h needs a forward decl of prof_info_t
because large.h is loaded before prof.h in the new master ordering.

No inline / static qualifiers are dropped; only the one inline moves
files. #ifdef blocks (JEMALLOC_PROF, JEMALLOC_PROF_LIBGCC,
JEMALLOC_PROF_GCC, JEMALLOC_DEBUG) are kept intact.
2026-05-29 08:53:41 -07:00
.github/workflows Update Github Actions generation script and upgrade freeBSD actions. 2026-04-21 13:16:44 -07:00
bin Updated jeprof with more symbols to filter. 2024-10-14 10:31:58 -07:00
build-aux Update config.guess and config.sub to the latest versions 2026-03-10 18:14:33 -07:00
doc Introduce pinned extents to contain unpurgeable pages 2026-05-05 10:44:28 -07:00
doc_internal update PROFILING_INTERNALS.md 2022-10-03 10:48:29 -07:00
include Consolidate prof_* and tcache_* header splits 2026-05-29 08:53:41 -07:00
m4 Support C++17 over-aligned allocation 2019-11-22 10:14:16 -08:00
msvc Move malloc routing into new malloc_dispatch module 2026-05-29 08:53:23 -07:00
scripts Add header dep graph script for cleanup verification 2026-05-28 19:01:12 -04:00
src Consolidate prof_* and tcache_* header splits 2026-05-29 08:53:41 -07:00
test Consolidate simple component headers (large, background_thread, bin) 2026-05-29 08:53:23 -07:00
.appveyor.yml Update msys to vs2022 for appveyor 2026-04-19 22:49:25 -07:00
.autom4te.cfg Disable autom4te cache. 2014-09-02 17:49:29 -07:00
.clang-format Modify .clang-format to have declarations aligned 2025-05-28 19:22:21 -07:00
.git-blame-ignore-revs Ignore the clang-format changes in the git blame. 2026-03-10 18:14:33 -07:00
.gitattributes fix git handling of newlines on windows 2014-05-07 18:48:39 -04:00
.gitignore Adding trace analysis in preparation for page allocator microbenchmark. 2026-03-10 18:14:33 -07:00
.travis.yml Remove Travis Windows CI for now since it has infra failures. 2026-03-10 18:14:33 -07:00
autogen.sh build: Make autogen.sh accept quoted extra options 2024-01-03 14:20:34 -08:00
ChangeLog Update ChangeLog for release 5.3.1 2026-04-13 17:12:37 -07:00
config.stamp.in Move repo contents in jemalloc/ to top level. 2011-03-31 20:36:17 -07:00
configure.ac Introduce pinned extents to contain unpurgeable pages 2026-05-05 10:44:28 -07:00
COPYING Update copyright dates. 2019-01-25 13:25:20 -08:00
INSTALL.md Add conf.c into msvc and update INSTALL.md 2026-04-20 12:22:59 -07:00
jemalloc.pc.in Expose jemalloc_prefix via pkg-config 2023-09-05 14:30:21 -07:00
Makefile.in Move malloc routing into new malloc_dispatch module 2026-05-29 08:53:23 -07:00
README switch to https 2023-03-09 11:44:02 -08:00
run_tests.sh Introduce scripts to run all possible tests 2017-01-30 17:51:57 -08:00
TUNING.md switch to https 2023-03-09 11:44:02 -08:00

jemalloc is a general purpose malloc(3) implementation that emphasizes
fragmentation avoidance and scalable concurrency support.  jemalloc first came
into use as the FreeBSD libc allocator in 2005, and since then it has found its
way into numerous applications that rely on its predictable behavior.  In 2010
jemalloc development efforts broadened to include developer support features
such as heap profiling and extensive monitoring/tuning hooks.  Modern jemalloc
releases continue to be integrated back into FreeBSD, and therefore versatility
remains critical.  Ongoing development efforts trend toward making jemalloc
among the best allocators for a broad range of demanding applications, and
eliminating/mitigating weaknesses that have practical repercussions for real
world applications.

The COPYING file contains copyright and licensing information.

The INSTALL file contains information on how to configure, build, and install
jemalloc.

The ChangeLog file contains a brief summary of changes for each release.

URL: https://jemalloc.net/