[scudo] Slightly improve the handling of last block in a region
authorChia-hung Duan <chiahungduan@google.com>
Wed, 8 Mar 2023 23:08:50 +0000 (23:08 +0000)
committerChia-hung Duan <chiahungduan@google.com>
Thu, 9 Mar 2023 16:18:00 +0000 (16:18 +0000)
commite4efa885387e2df3a5e9abb3d64f232d2b4e9025
tree48eae5d6d8a3a4aed866fa75372bc65cb46134ee
parent32188047fcf8e4f68fbc26b148a11a9ed6b7e1b2
[scudo] Slightly improve the handling of last block in a region

Instead of going through all those trailing blocks, just count the
number and increase the counter at once.

Reviewed By: cferris

Differential Revision: https://reviews.llvm.org/D145419
compiler-rt/lib/scudo/standalone/primary32.h
compiler-rt/lib/scudo/standalone/release.h