commit | fe8e3d2b5eda0518a98db2ab346d4e450b530a73 | [log] [tgz] |
---|---|---|
author | Aaron Green <aarongreen@google.com> | Fri Jan 05 18:58:05 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jan 05 18:58:05 2024 +0000 |
tree | 04a2337804f1e29318048d2b462ef53561fdd186 | |
parent | 877273458e68466949a2f68373150ae3d7bf6a3a [diff] |
pw_allocator: Add extra bytes to Block The CL adds a new template parameter, kNumExtraBytes, to `Block`, and refactors the existing parameters. The new parameter can be used to reserve space in the block's header that can be used to store and fetch allocation metadata. Additionally, the `kMaxSize` parameter has been dropped and replaced by a parameter for `kNumFlags`. This allows better elision of flag-related code when it is not needed, and encourages downstream projects to define fewer block types rather than one for each allocation pool size. Change-Id: I3530d94b1302e0dada9ad1f2f749ee94498ebb41 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/185954 Reviewed-by: Taylor Cramer <cramertj@google.com> Commit-Queue: Aaron Green <aarongreen@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.