mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-02 02:04:20 +03:00
No description
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. |
||
|---|---|---|
| .github/workflows | ||
| bin | ||
| build-aux | ||
| doc | ||
| doc_internal | ||
| include | ||
| m4 | ||
| msvc | ||
| scripts | ||
| src | ||
| test | ||
| .appveyor.yml | ||
| .autom4te.cfg | ||
| .clang-format | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| autogen.sh | ||
| ChangeLog | ||
| config.stamp.in | ||
| configure.ac | ||
| COPYING | ||
| INSTALL.md | ||
| jemalloc.pc.in | ||
| Makefile.in | ||
| README | ||
| run_tests.sh | ||
| TUNING.md | ||
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/