[all-commits] [llvm/llvm-project] 50979d: [scudo][standalone] Use BatchClassId in drain rath...

Kostya Kortchinsky via All-commits all-commits at lists.llvm.org
Fri Apr 9 14:09:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 50979defc9555d66dc2427e1dac68fd62c45e524
      https://github.com/llvm/llvm-project/commit/50979defc9555d66dc2427e1dac68fd62c45e524
  Author: Kostya Kortchinsky <kostyak at google.com>
  Date:   2021-04-09 (Fri, 09 Apr 2021)

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

  Log Message:
  -----------
  [scudo][standalone] Use BatchClassId in drain rather than 0

D99763 fixed `SizeClassAllocatorLocalCache::drain` but with the
assumption that `BatchClassId` is 0 - which is currently true. I would
rather not make the assumption so that if we ever change the ID of
the batch class, the loop would still work. Since `BatchClassId` is
used more often in `local_cache.h`, introduce a constant so that we
don't have to specify `SizeClassMap::` every time.

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




More information about the All-commits mailing list