pbr-cpp-memory-pool v1.2.0 — Milestone 9 (Ergonomics, Hardening & Tooling)
The first post-v1.0.0 MINOR. v1.2.0 closes Milestone 9 — a coherent wave of additive, ABI-compatible capabilities on top of the frozen public surface. The v1.0.0 C ABI and C++ types are unchanged: a default build is byte-for-byte and cycle-for-cycle what v1.1.x shipped. Every new capability is header-only, behind an opt-in compile-time knob, or test/bench-only — so nothing here can perturb an existing consumer that does not ask for it.
Added
- [#107]
std::pmr::memory_resourceadapter —PoolMemoryResource(ADR-0042). A header-only Adapter that binds onePoolbehind the runtimestd::pmr::memory_resourceinterface, so anystd::pmrcontainer can draw from it throughstd::pmr::polymorphic_allocatorwithout the per-typePoolAllocator<T>rebind — the "door left open" in ADR-0018. Deterministic(bytes, alignment)routing; over-sized / over-aligned requests fall back to a configurable upstream resource; exhaustion throwsstd::bad_alloc;is_equalby(pool, upstream)identity. Gated behindPBR_MEMORY_POOL_HAS_PMRwhere<memory_resource>exists. - [#109] Opt-in debug hardening (ADR-0043). A compile-time knob
PBR_MEMORY_POOL_HARDENING(OFF by default; ahardenpreset turns it on) hardens the intrusive free list: freed-block poisoning (0xDE) catches use-after-free on the next allocation; a per-slot trailing guard word catches a write pastblock_size(buffer overflow) and a repeated free (double-free — the ADR-0012 gap); and glibc-style safe-linking (ptr XOR (slot_addr >> 12)) protects the in-band next-link. A swappableHardeningViolationHandlerreports violations (the default aborts). The guard lives in added slot stride, soblock_sizeand the ADR-0009 alignment guarantee are unchanged and the default build is fully compiled out. AhardenCI cell builds and tests it on each Tier-1 platform (including MSVC, where ASan is unavailable). - [#108] Coverage-guided fuzzing harness (ADR-0044).
pool_fuzz.cppdrives randomizedalloc/freesequences through a stateful opcode interpreter, asserting no-alias, per-block-canary, foreign/NULL-no-op, andInstrumentedPoolaccounting invariants against a shadow oracle. One engine-agnostic source yields the Clang-only libFuzzer targetpool_fuzz(opt-in, run bounded on every PR by a dedicatedfuzzCI job) and an always-built standalonepool_fuzz_replaythat gates the seed corpus everywhere — including MSVC, where libFuzzer is unavailable. - [#111] Benchmark extension — tail-latency percentiles + external baselines (ADR-0045, extends ADR-0014). An opt-in
--percentilesmode emits a per-operation p50/p90/p99/p999 table; the dynamic-pool growth row surfaces the microsecond-scale growth spike the aggregate median hides. jemalloc / tcmalloc are measured by re-running the bench underLD_PRELOAD(they take over globalmallocon load, so they cannot be linked ordlopen'd beside the system allocator — an in-process attempt was tried and rejected); a# allocator:header discloses which allocator each run measured. The bench carries no allocator-specific code, so the aggregate ns/op table and its committed numbers are unchanged. - [#105] C4 component diagram of the pool internals in the specification (§4.2), authored in Mermaid (ADR-0041) — closing the last open item of the specification review.
Changed
- The specification was reconciled with the as-built system (cross-linked realizing ADRs, formalized subsection anchors, a
§7spec→ADR map), and the Milestone 9 features were folded into it as they shipped. Thezh-Hans/jaREADME translations were re-synced to thev1.1.2status. Documentation-only; no API change.
Architecture Decision Records
Five new ADRs — 0041 (Mermaid diagram tooling), 0042 (pmr adapter), 0043 (debug hardening), 0044 (fuzzing harness), and 0045 (benchmark percentiles + baselines) — bring the running total to 45.
Spec Coverage Map
No regression — all rows remain ✅ (ADR-0029). The new features realize previously-deferred §4.1/§5.3 (hardening), §6.3 (percentiles + baselines), and §6.4 (fuzzing) items, now mapped in the spec's §7.
What this release does not contain
- No public-API/ABI change.
Pool,TypedPool,PoolAllocator,InstrumentedPool, the C ABI, and the existing compile-time knobs are unchanged.PoolMemoryResourceis a new additive type;PBR_MEMORY_POOL_HARDENING/PBR_MEMORY_POOL_BUILD_FUZZERSare new opt-in build knobs, OFF by default. - No behaviour change in a default build. Hardening, the fuzzer, and the benchmark additions are all opt-in or test/bench-only.
Verifying the release
Each platform tarball is the same complete cmake --install tree as v1.1.x (full headers + static archive + CMake package config + pkg-config .pc). SHA-256 checksums are in SHA256SUMS:
sha256sum --check SHA256SUMSLinks
- Changelog entry:
CHANGELOG.md—[1.2.0] - Roadmap:
ROADMAP.md— Milestone 9 - Previous release:
docs/releases/v1.1.2.md