[all-commits] [llvm/llvm-project] bd5ca4: [scudo][standalone] Skip irrelevant regions during...

Kostya Kortchinsky via All-commits all-commits at lists.llvm.org
Tue Aug 25 07:41:32 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bd5ca4f0ed4adfa29150c18a621acb3e71d41450
      https://github.com/llvm/llvm-project/commit/bd5ca4f0ed4adfa29150c18a621acb3e71d41450
  Author: Kostya Kortchinsky <kostyak at google.com>
  Date:   2020-08-25 (Tue, 25 Aug 2020)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/primary32.h
    M compiler-rt/lib/scudo/standalone/primary64.h
    M compiler-rt/lib/scudo/standalone/release.h
    M compiler-rt/lib/scudo/standalone/tests/release_test.cpp

  Log Message:
  -----------
  [scudo][standalone] Skip irrelevant regions during release

With the 'new' way of releasing on 32-bit, we iterate through all the
regions in between `First` and `Last`, which covers regions that do not
belong to the class size we are working with. This is effectively wasted
cycles.

With this change, we add a `SkipRegion` lambda to `releaseFreeMemoryToOS`
that will allow the release function to know when to skip a region.
For the 64-bit primary, since we are only working with 1 region, we never
skip.

Reviewed By: hctim

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




More information about the All-commits mailing list