Releases: danielPoloWork/pbr-cpp-memory-pool
v1.1.2
pbr-cpp-memory-pool v1.1.2 — Maintenance (InstrumentedPool & core bug fixes)
A maintenance PATCH. v1.1.2 fixes four verified, externally-reported defects — the first real use of the in-repo bug ledger (ADR-0039) — plus the accumulated documentation work since v1.1.1. The library's public surface is unchanged (no API/ABI change); the fixes are header-only or core internals.
Fixed
- BUG-0001 —
InstrumentedPoolgrowth-counter data race (high).notify_if_grew()read+wrote the non-atomiclast_growths_on the allocation hot path, racing under the documented-safeMUTEX+ dynamic-growth + concurrent configuration (UB).last_growths_is nowstd::atomic, advanced with acompare_exchangesogrewfires once per growth without a race. A concurrentInstrumentedPoolcase was added to the ThreadSanitizer stress suite (the coverage gap that hid it). - BUG-0002 —
live_counter underflow (medium).deallocate()decremented the unsignedlive_for any non-null pointer, so a foreign or double-freed pointer (a no-op in the core, ADR-0012) wrapped it toSIZE_MAX. The decrement now clamps at zero. The C header's double-free note was corrected — the Decorator counts deallocations but does not detect a double-free. - BUG-0003 — missing
destroyedevent on move-assignment (low). Move-assigning over an instrumented pool released itsPooland observers without emittingPoolEvent::destroyed, asymmetric with the destructor. It now notifies before reassignment. - BUG-0004 — unguarded
grow_pooloverflow (low/latent).total * (grow_factor_ - 1)was computed before any overflow check; awould_overflow_productguard was added first, mirroring the create path. Not runtime-reachable (RAM exhausts first), so no test — a consistency fix.
Also in this release
- The redundant
docs-siteCI badge was removed from the README header (all three locales); the published Doxygen site is still linked from the API reference badge. - The
zh-Hans/jaREADME translations were re-synced to thev1.1.1status.
Architecture Decision Records
No new ADRs — v1.1.2 is bug fixes and documentation, governed by existing decisions (ADR-0034 maintenance protocol, ADR-0039 bug ledger). The running total stays 40.
Spec Coverage Map
No change — all fifteen rows remain ✅ (ADR-0029). The fixes correct decorator/diagnostic behaviour and a latent guard, not a spec requirement.
What this release does not contain
- No public-API/ABI change —
Pool,TypedPool,PoolAllocator, the C ABI, and the compile-time knobs are unchanged. - No double-free detection —
v1.1.2corrects the over-promising header note; genuine double-free detection in the Decorator remains possible future work (it would be a feature, not a patch).
Verifying the release
Each platform tarball is the same complete cmake --install tree as v1.1.1 (full headers + static archive + CMake package config + pkg-config .pc). SHA-256 checksums are in SHA256SUMS:
sha256sum --check SHA256SUMSLinks
- Changelog entry:
CHANGELOG.md—[1.1.2] - Bug ledger:
docs/bugs/ - Maintenance protocol:
docs/workflow/maintenance.md - Previous release:
docs/releases/v1.1.1.md
v1.1.1
pbr-cpp-memory-pool v1.1.1 — Maintenance (bug ledger, PR-metadata policy, governance)
A maintenance PATCH. v1.1.1 is purely documentation, process, and tooling — the shipped library is byte-identical to v1.1.0 (no API, ABI, or behaviour change), so every existing consumer is unaffected. It bundles the post-v1.1.0 governance and quality work accumulated on master.
What's in the box
In-repo bug ledger & triage protocol (ADR-0039)
Known defects and the triage of incoming reports now have a durable, reviewable home under docs/bugs/: one Markdown record per defect, BUG-NNNN-<slug>.md under a discovery-date tree docs/bugs/<YYYY>/<MM>/, with a stable monotonic id, structured frontmatter, an index + template, and a lifecycle (open → confirmed → fixed, plus wontfix/duplicate/cannot-reproduce). The ledger is the source of truth (a GitHub issue is referenced, not authoritative). The agent rule (AGENTS.md §7.7) creates a record only for verified, reproducible defects and verifies third-party reports before accepting them (unsubstantiated reports are still recorded as cannot-reproduce/rejected). A new bugs consistency-lint check guards record integrity.
Pull-request metadata policy (ADR-0040)
Every agent-opened PR now also sets a maintainer assignee, exactly one type label (Conventional-Commit type → label; docs reuses the built-in documentation label), and the current open release milestone. The eight type labels and the v1.1.1 milestone were created. Reviewers are deferred (the sole collaborator is the PR author — GitHub forbids self-review) and Projects are deferred (the gh token lacks the project scope); the rule names how each switches on. Codified in AGENTS.md §6.4.
Governance & documentation structure
- Session journal (ADR-0036) — dated end-of-session checkpoints extracted from
ROADMAP.mdintodocs/journal/(one file per session underYYYY/MM/), leavingROADMAP.mda forward plan. - New-feature roadmap-placement rule (ADR-0037) — when a feature warrants a new milestone vs. an appended item vs. neither.
- Per-release changelog split (ADR-0038) — released entries are now one immutable file per release under
docs/changelog/v<MAJOR>/, the rootCHANGELOG.mdkeeping only[Unreleased]+ the index. SECURITY.md— the public security policy (supported versions, private vulnerability reporting, coordinated disclosure), realizing the addition referenced by the maintenance protocol.
CI & tooling
packaging-smokeworkflow — end-to-end smoke tests for the vcpkg port and Conan recipe (which cannot be built on the maintainer's box), pinned to thev1.0.0source tag and run on recipe changes + weekly.- GitHub Actions bumped off the deprecated Node 20 runtime onto Node 24.
- API-reference badge in the README linking to the published Doxygen site.
Architecture Decision Records
Five ADRs accepted since v1.1.0, taking the running total from 35 to 40:
- ADR-0036 — extract the session journal from
ROADMAP.md. - ADR-0037 — new-feature roadmap placement (milestone vs. item).
- ADR-0038 — split the changelog into one file per release.
- ADR-0039 — in-repo bug ledger and agent triage protocol.
- ADR-0040 — pull-request metadata policy.
Spec Coverage Map
No change — v1.1.1 is additive documentation/process/tooling, not a spec requirement. All fifteen rows remain ✅ (accepted at v1.0.0, ADR-0029).
What this release does not contain
- No library code change — the static archive is unchanged from
v1.1.0; this is a docs/process/tooling PATCH. - The
zh-Hans/jaREADME translations are re-synced to thev1.1.1status in a follow-up PR (the manifest's two README rows are markedstalein this release).
Verifying the release
Each platform tarball is the same complete cmake --install tree as v1.1.0 (full headers + static archive + CMake package config + pkg-config .pc). SHA-256 checksums are in SHA256SUMS:
sha256sum --check SHA256SUMSLinks
- Changelog entry:
CHANGELOG.md—[1.1.1] - Maintenance protocol:
docs/workflow/maintenance.md - Bug ledger:
docs/bugs/ - Previous release:
docs/releases/v1.1.0.md
v1.1.0
pbr-cpp-memory-pool v1.1.0 — Milestone 8: Internationalization & Post-Release Governance
The first post-1.0 MINOR. v1.1.0 is purely additive documentation and governance — the shipped library is unchanged from v1.0.x (no API, ABI, or behaviour change), so every existing consumer is unaffected. It opens the maintained-product phase: documentation translations, post-release governance, and an automated congruence check.
What's in the box
Documentation translations (ADR-0032)
A file-based, zero-external-dependency translation system under docs/i18n/. English stays the single normative source; translations are a convenience layer with an explicit English fallback. Both target languages — Simplified Chinese (zh-Hans) and Japanese (ja) — now cover the full translatable surface: the README, the specification, and the patterns-catalogue overview, each at a 1:1 mirrored path with an "English is normative" banner pinned to the source commit it was translated from.
- A commit-pinned
translation-status.mdmanifest makes staleness machine-detectable. - A
glossary.mdfixes canonical ↔zh-Hans↔jaterminology (with explicit keep in English entries forfree list,RAII,Pimpl, the GoF pattern names, etc.).
The spec is now English-normative (ADR-0033)
The specification — originally authored in Italian — was translated to English in place as the single normative source (a faithful translation; requirements unchanged), so the whole repository is uniformly English (AGENTS.md §2) and the spec can be localized coherently like the rest of the surface.
Post-release maintenance protocol (ADR-0034)
docs/workflow/maintenance.md governs the maintained-product phase: the version-protected surface, a patch/minor/major decision tree (ambiguous rounds up), per-level version/CHANGELOG/release-notes mechanics, the hotfix-by-releasability + backport path, a private-first Security-categorized fix path, and a deprecate-in-MINOR → window → remove-in-MAJOR deprecation policy. The agent-vs-human release boundary is unchanged.
Agent-runnable consistency lint (ADR-0035)
tools/consistency_lint.py — a dependency-free (Python 3 stdlib only) checker that asserts cross-artifact congruence and exits non-zero with an actionable report. Six checks: version lockstep, ADR index ↔ files, every catalogued pattern backed by an ADR + code location, no dangling Spec Coverage Map row, no stale i18n translation, and README ↔ ROADMAP milestone agreement. It runs as a CI gate (the consistency job in docs.yml) and is wired into the agent contract as a mandatory pre-PR check (AGENTS.md §6.4 + the PR template), with a failure → remediation map in the maintenance protocol.
python tools/consistency_lint.py # run it locally before drafting a PRArchitecture Decision Records
Four ADRs accepted in Milestone 8, taking the running total from 31 to 35:
- ADR-0032 — documentation i18n architecture.
- ADR-0033 — English as the specification's normative language.
- ADR-0034 — post-release maintenance protocol.
- ADR-0035 — agent-runnable consistency lint.
Spec Coverage Map
No change — Milestone 8 is additive documentation and governance, not a spec requirement. All fifteen rows remain ✅ (accepted at v1.0.0, ADR-0029).
What this release does not contain
- No library code change — the static archive is unchanged from
v1.0.1; this is a docs/governance MINOR. - Localization of the ADRs /
CHANGELOG/ROADMAP(English-only by design — ADR-0032 §2), a third translation language, and aSECURITY.md(a noted follow-up) are out of scope.
Verifying the release
Each platform tarball is the same complete cmake --install tree as v1.0.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.1.0] - Milestone plan:
ROADMAP.md— Milestone 8 - Maintenance protocol:
docs/workflow/maintenance.md - Previous release:
docs/releases/v1.0.1.md
v1.0.1
pbr-cpp-memory-pool v1.0.1 — packaging patch
v1.0.1 is a packaging-only patch over v1.0.0. It ships the two Phase-2 package-manager integrations that closed Milestone 7's stretch items. The library itself is byte-identical to v1.0.0 — no source, API, ABI, or behaviour change; only repository-side packaging metadata was added. (That is why this is a PATCH rather than a MINOR, and why Milestone 8 still closes at v1.1.0.)
What's new
vcpkg port (ADR-0030)
An in-repo overlay port under ports/pbr-memory-pool/, pinned to the v1.0.0 source tag by SHA512. It builds from source through the project's own CMake install rules (ADR-0028) and relocates the find_package config and pkg-config .pc into vcpkg's layout.
vcpkg install pbr-memory-pool --overlay-ports=portsConan 2.x recipe (ADR-0031)
A recipe under conan/ (with a ConanCenter-style test_package/), pinned to the v1.0.0 source tag by SHA256. It builds through the same install rules and re-exposes the target via Conan's generators.
conan create conan/ # then depend on pbr-memory-pool/1.0.1Both integrations yield the identical imported target as every other consumption mode:
find_package(pbr_memory_pool CONFIG REQUIRED)
target_link_libraries(my_app PRIVATE pbr::memory_pool)Registry publication (microsoft/vcpkg, ConanCenter / self-hosted) is deferred — both port files are written to upstream conventions and the submission steps are documented in ports/README.md and conan/README.md.
Spec Coverage Map
No change — packaging adds no spec requirement. All fifteen rows remain ✅ (accepted in ADR-0029 at v1.0.0).
Verifying the release
Each platform tarball is the same complete cmake --install tree as v1.0.0 (full headers + static archive + CMake package config + pkg-config .pc). SHA-256 checksums are in SHA256SUMS:
sha256sum --check SHA256SUMSLinks
- Changelog entry:
CHANGELOG.md—[1.0.1] - Previous release:
docs/releases/v1.0.0.md - Specification:
docs/specs/01_spec_cpp_memory_pool.md
v1.0.0
pbr-cpp-memory-pool v1.0.0 — the first stable release
v1.0.0 is the stable reference release of pbr-cpp-memory-pool. The public C ABI and the C++ surface are now frozen under the SemVer 1.0 promise — no breaking change without a 2.0.0. Milestone 7 added the release polish (published API docs, an expanded README, installable packaging, and the compliance audits) on top of the feature set delivered across Milestones 0–6.
What the library is
A fixed-block-size memory pool with constant-time O(1) allocation and deallocation and zero external fragmentation, built on an implicit free list (free blocks store the next-free pointer in their own storage, so live blocks carry zero per-block metadata — spec §4). It is C++17 internally with an ANSI C (C89-compatible) public surface and no external dependencies (spec §3.3).
The public C API (spec §5)
typedef struct memory_pool memory_pool_t;
memory_pool_t* memory_pool_create(size_t block_size, size_t block_count);
void* memory_pool_alloc(memory_pool_t* pool);
void memory_pool_free(memory_pool_t* pool, void* block);
void memory_pool_destroy(memory_pool_t* pool);The C++ surface
Pool— move-only RAII owner (ctor → create, dtor → destroy), with the dual-verb exception policy (allocatethrowsstd::bad_alloc,try_allocateisnoexcept), thePool::makeFactory Method, and the fluentPoolBuilder.TypedPool<T>— compile-time-correctblock_sizeforT, withconstruct/destroyobject-lifetime verbs.PoolAllocator<T>— a Cpp17Allocator Adapter sostd::list/std::map/std::setand custom containers draw nodes from the pool.InstrumentedPool+PoolObserver— opt-in Decorator (counters, occupancy, on-demand logging) and runtime Observer (lifecycle events), zero cost to an undecoratedPool.FreeListView— a read-only diagnostic Iterator over the free list, compiled out of release builds unless explicitly enabled.
Capabilities delivered across Milestones 0–6
- O(1) alloc/free on the implicit free list;
NULL(C) /std::bad_alloc(C++) on exhaustion (spec §2.1–§2.3). - Optional, macro-configurable thread safety —
NONE(default, single-thread fast path preserved),MUTEX, orLOCKFREE(ABA-tagged Treiber stack), a compile-time Strategy so the single-threaded build pays nothing (spec §2.4). - Optional dynamic growth — geometric overflow chunks acquired on exhaustion (Composite chunk list), opt-in per pool (spec §2.2).
- Minimal overhead — 0 bytes per block, ≤ 192 bytes per pool, CI-gated (spec §3.2).
- Leak-free —
destroyreturns every byte to the OS, Valgrind-gated (spec §3.1).
Milestone 7 — what v1.0.0 adds on top
- M7.1 — Doxygen API-reference site (ADR-0027): the public-header contract is built warn-as-error on every PR and published to GitHub Pages on
master. - M7.2 — README for the v1.0 audience: a full Usage section (six compilable examples), a consolidated Performance summary, and a Compatibility matrix.
- M7.4 — Install / packaging, Phase 1 (ADR-0028):
find_package(pbr_memory_pool CONFIG REQUIRED)+target_link_libraries(app pbr::memory_pool), a relocatable package config, and a pkg-config.pc. Release tarballs are now completefind_package-ready install trees. - M7.3 / M7.5 / M7.6 — audits: the CHANGELOG v1.0.0 audit, the patterns-catalogue audit (all eleven adopted patterns have an ADR + a live code location), and the specification-compliance acceptance audit (ADR-0029).
Stability promise
From v1.0.0 the public C ABI (memory_pool_*, including the O(1) introspection accessors) and the C++ surface (Pool, TypedPool<T>, PoolAllocator<T>, InstrumentedPool, PoolObserver) are stable. Source-incompatible changes will only land in a future 2.0.0; 1.x releases are additive or fix-only. The CMake package config advertises SameMajorVersion compatibility accordingly.
Spec Coverage Map — accepted
All fifteen Spec Coverage Map rows are ✅, re-verified end-to-end in the M7.6 acceptance audit (ADR-0029) against ten CTest targets (95 doctest cases + the spec_6_2_valgrind C program), the c_consumer_min.c ANSI-C consumer, and the CI build / sanitizer / Valgrind / thread-safety / TSan / benchmark / C89-C99 / zero-dependency jobs. No gap, regression, or unsupported mark.
Architecture Decision Records
Twenty-nine ADRs (0001–0029) record every architectural decision — the free-list layout, the C/C++ boundary and exception policy, the eleven design patterns, the thread-safety and dynamic-growth strategies, the metadata budget, the documentation and packaging pipelines, and the v1.0 acceptance audit. Index: docs/adr/README.md.
Performance
Versus malloc/free on the maintainer's Skylake × MSVC × x64 reference host: a pre-sized fixed pool is 4–11× faster single-threaded, a growing pool stays ~2× faster amortized, and under contention LOCKFREE beats MUTEX. Full reports under docs/bench/; methodology in ADR-0014.
What this release does not contain (deferred, by design)
- Double-free detection (deferred from M2 / ADR-0012).
- Per-thread caches (ADR-0020 §4) and lock-free dynamic growth (ADR-0024 §2).
- Pool shrink-on-idle (ADR-0022).
- vcpkg / Conan packaging — Phase 2 distribution, post-1.0 (ROADMAP §7.8–§7.9).
None corresponds to a spec clause, so none affects the v1.0 acceptance.
Install and use
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DPBR_MEMORY_POOL_BUILD_TESTS=OFF
cmake --build build
cmake --install build --prefix /your/prefixfind_package(pbr_memory_pool CONFIG REQUIRED)
target_link_libraries(my_app PRIVATE pbr::memory_pool)Verifying the release
Each platform tarball produced by release.yml is a complete cmake --install tree — the full public-header set, the static archive, the CMake package config, and the pkg-config .pc — plus top-level LICENSE / README.md / CHANGELOG.md. SHA-256 checksums are in SHA256SUMS:
sha256sum --check SHA256SUMSLinks
- Changelog entry:
CHANGELOG.md—[1.0.0] - Milestone plan:
ROADMAP.md— Milestone 7 - Specification:
docs/specs/01_spec_cpp_memory_pool.md - Acceptance audit: ADR-0029
- Previous release:
docs/releases/v0.6.0.md