commit | 7aa9a12a5dcfb42c1103682f3c89d27e6aff0a1a | [log] [tgz] |
---|---|---|
author | Chris Suter <csuter@google.com> | Thu Mar 13 14:28:54 2025 -0700 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Mar 13 14:28:54 2025 -0700 |
tree | 0f16bf6fe68991808ac7eabb9dcdbbbcb21f3086 | |
parent | fe4eb2ef51723e0b79113c45fcc229a1331aaffd [diff] |
[fuchsia-async] Some memory saving optimisations Prior to this change, tasks were held in Arc and then a Box. This CL removes one of them so that we just have a Box. The Arc reference count is now integrated into AtomicFuture's state, so that also saves the strong and weak reference counts that Arc has. There are some other memory savings: `Scope::all_tasks` is now a `HashSet` rather than a `HashMap`. Unfortunately, this did involve the use some more unsafe code, but AtomicFuture already had a fair bit of that. This might show some performance improvements due to improved CPU cache behaviour. Change-Id: I5b4de0a40511a77d30ef00e500e84651b4748fa8 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1224064 Fuchsia-Auto-Submit: Chris Suter <csuter@google.com> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com> Reviewed-by: Adam Perry <adamperry@google.com> Reviewed-by: Jacob Rutherford <jruthe@google.com>
Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.