[all-commits] [llvm/llvm-project] fb8d89: [scudo] Early exit from the case can't do page rel...

ChiaHungDuan via All-commits all-commits at lists.llvm.org
Wed Mar 22 14:48:46 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb8d894f23c5e805f0c87d89fb9d6c0eed3a0e72
  Author: Chia-hung Duan <chiahungduan at google.com>
  Date:   2023-03-22 (Wed, 22 Mar 2023)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/primary64.h

  Log Message:
  [scudo] Early exit from the case can't do page release.

There are heuristics to avoid marking blocks if there's little chance
to release pages. So far, those logics only exist in block-marking
section and we didn't leverage the results of those logics. For example,
in a round of releaseToOS try, we know it's still 128 KB away from the
release threshold. In the next round of releaseToOS, we can early exit
if the number of pushed bytes is smaller than 128 KB without looping
each memory group. This CL adds this heuristic and has reduced amount of
time in checking the status of each memory group.

This CL only applies this heuristic on SizeClassAllocator64.
SizeClassAllocator32 has a smaller region/group size and has little
impact on the default value.

Reviewed By: cferris

Differential Revision: https://reviews.llvm.org/D146312

More information about the All-commits mailing list