We allocate the page map before knowing if there're groups can be
released. This may result in many redundant map()/unmap() operations if
there's no page to release.
Make the page map be lazy initialized.
Paths
| Differential D136873
[scudo] Lazy initialize the PageMap while page releasing ClosedPublic Authored by Chia-hungDuan on Oct 27 2022, 11:51 AM.
Details Summary We allocate the page map before knowing if there're groups can be Make the page map be lazy initialized.
Diff Detail
Unit TestsFailed Event TimelineThis revision is now accepted and ready to land.Oct 27 2022, 2:41 PM
Chia-hungDuan added a child revision: D136898: [scudo] Fix the calculating of memory group usage.Oct 27 2022, 4:18 PM Comment Actions LGTM
This revision was landed with ongoing or failed builds.Oct 28 2022, 2:13 PM Closed by commit rGa1e325ce7cce: [scudo] Lazy initialize the PageMap while page releasing (authored by Chia-hungDuan). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 471248 compiler-rt/lib/scudo/standalone/primary32.h
compiler-rt/lib/scudo/standalone/primary64.h
compiler-rt/lib/scudo/standalone/release.h
compiler-rt/lib/scudo/standalone/tests/release_test.cpp
|
Is it always the case that the NumberOfRegions, PagesCount, FullPagesBlockCountMax are the same when this is called? In other words, would you ever make this call and the values in the PageMap would need to be changed?