-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_allocator: Fix metrics for blocks that shift bytes
Previously, the TrackingAllocator tried to account for how much memory was allocated at at any given time by intercepting requests and responses at the Allocator API level. This approach was fundamentally flawed since allocators may adjust allocations internally. Examples include block allocators which may pad an existing allocation to satisfy an allocation request or may pad a new allocation when the remaining space was too small for a block. In both these cases, the extra space may be reclaimed when the subsequent block is freed. In both these cases, a TrackingAllocator would incorrectly report the amount of allocated memory. Bug: 378743727 Change-Id: Ic931997ef1eb8206d214e7dc033503e9022000f4 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/249372 Lint: Lint 🤖 <[email protected]> Commit-Queue: Aaron Green <[email protected]> Pigweed-Auto-Submit: Aaron Green <[email protected]> Reviewed-by: Wyatt Hepler <[email protected]> Docs-Not-Needed: Aaron Green <[email protected]>
- Loading branch information
1 parent
33d00a7
commit 65b5e33
Showing
10 changed files
with
177 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters