commit | 26ccfc66c181be7da3580cc44bf017732b73c4ab | [log] [tgz] |
---|---|---|
author | aarongreen <aarongreen@google.com> | Fri Oct 20 23:19:11 2023 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Oct 20 23:19:11 2023 +0000 |
tree | bb4f112f9b9918ba73005ac5936a2abb483e4942 | |
parent | 3bad357764f0ce52a6820d0616b88f06ef81fee5 [diff] |
pw_allocator: Refactor Block to use encoded offsets This CL refactors `Block` into `Block<UintType, kMaxSize>`. Instead of using next and previous block pointers, it now encodes offsets and flags in fields of type `UintType`. Depending on `kMaxSize`, there may be bits of `UintType` that are not needed to address blocks. These bits are available to be used as custom flags. Change-Id: Ic979f6d6982088de810bdd9b793e1e115aef65eb Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/176578 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/.