From 74cf55f5848aa3b7436d1ddf7440d64a8859e1da Mon Sep 17 00:00:00 2001 From: David Lafreniere Date: Sat, 14 Nov 2026 15:23:34 -0800 Subject: [PATCH] Depend on the Allocator package (1.2.0) - library.json: version 1.2.0, depends on endurodave/Allocator ^1.1.0 and no longer packages its own Allocator.cpp/.h, so projects installing both libraries don't get duplicate Allocator definitions. - Allocator.cpp synced with Allocator: GetBlockCount() counts pool blocks (xalloc_stats with STATIC_POOLS showed 0 blocks). - Example, README and CI note the Allocator dependency. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/platformio.yml | 3 ++- Allocator.cpp | 1 + README.md | 4 ++-- examples/platformio/xallocator-demo/platformio.ini | 6 ++++-- library.json | 9 ++++++--- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/platformio.yml b/.github/workflows/platformio.yml index 6c83781..4040832 100644 --- a/.github/workflows/platformio.yml +++ b/.github/workflows/platformio.yml @@ -3,7 +3,8 @@ name: PlatformIO # Builds examples/platformio/xallocator-demo for every board in its # platformio.ini, and runs the native build on the desktop. The example's # lib_deps points at this checkout, so each push tests the library as -# PlatformIO users consume it (library.json, srcFilter). +# PlatformIO users consume it (library.json, srcFilter). Allocator, a +# dependency in library.json, comes from the PlatformIO registry. on: push: diff --git a/Allocator.cpp b/Allocator.cpp index bbc049d..29f023e 100644 --- a/Allocator.cpp +++ b/Allocator.cpp @@ -72,6 +72,7 @@ void* Allocator::Allocate(size_t size) if(m_poolIndex < m_maxObjects) { pBlock = (void*)(m_pPool + (m_poolIndex++ * m_blockSize)); + m_blockCnt++; } else { diff --git a/README.md b/README.md index 5e8e89d..0a95317 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,10 @@ Originally published on CodeProject at: ", "+", "+"] + "srcFilter": ["-<*>", "+"] }, "examples": [ {