commit | 7e0832b1f41c21dc6f3d60379cbb20432a8cb4f7 | [log] [tgz] |
---|---|---|
author | Aaron Green <aarongreen@pigweed.infra.roller.google.com> | Wed Sep 18 17:43:26 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Sep 18 17:43:26 2024 +0000 |
tree | eddaf1c3c51b756f49496cf84b2c86b3cb095b04 | |
parent | b1466aa5c0fc08ca90cdeaab02c31fc4d9a78d39 [diff] |
roll: pigweed pw_bytes: Add PackedPtr Every object types has an alignment requirement, and for most types this is greater than one. As a result, pointers to these types have one or more least significant bits that are always zero. For certain types, such as intrusive container types, it is desirable to reuse these bits and avoid creating additional fields. This class facilitates those use cases by providing a wrapper type that can be treated like a pointer in many cases, but that can also be used to set and get a value from the unused bits. This storage is not free: this class must perform bit operations on every dereference, adding to its performance cost and code size. This class should only be used when the benefits of saving memory overhead outweigh these costs. Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/235104 Original-Revision: cda5ba673366d189e0ea326a0fa808df181730a7 Rolled-Repo: https://pigweed.googlesource.com/pigweed/pigweed Rolled-Commits: faac61757b5428..cda5ba673366d1 Roller-URL: https://ci.chromium.org/b/8736437447468905537 GitWatcher: ignore CQ-Do-Not-Cancel-Tryjobs: true Change-Id: I6804cb041390b562226a5bd0f9645d196720abf9 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/236834 Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com> Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
git clone https://pigweed.googlesource.com/pigweed/showcase/sense
Welcome to Pigweed Sense, a tour of key Pigweed components experienced through an imagined air quality product.
Please visit Sense: An interactive tour through Pigweed to get started.