[all-commits] [llvm/llvm-project] e74834: [scudo] Use bytes-in-freelist as a hint of page re...

ChiaHungDuan via All-commits all-commits at lists.llvm.org
Fri Mar 24 10:12:28 PDT 2023


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

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

  Log Message:
  -----------
  [scudo] Use bytes-in-freelist as a hint of page release

Tracking the pushed bytes between to releaseToOSMaybe calls may lead to
a overestimated case that if we do malloc 2KB -> free 2KB -> malloc 2KB
-> free 2KB, we may think we have released 4KB but it only releases 2KB
actually. Switch to use bytes-in-freelist excludes more cases that can't
release the pages

Reviewed By: cferris

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




More information about the All-commits mailing list