[all-commits] [llvm/llvm-project] 2c5677: [scudo][standalone] Compact pointers for Caches/Ba...

Kostya Kortchinsky via All-commits all-commits at lists.llvm.org
Thu Feb 25 12:15:07 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c56776a319edf33505ca6c7f9be59657cdaf52b
      https://github.com/llvm/llvm-project/commit/2c56776a319edf33505ca6c7f9be59657cdaf52b
  Author: Kostya Kortchinsky <kostyak at google.com>
  Date:   2021-02-25 (Thu, 25 Feb 2021)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/allocator_config.h
    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
    M compiler-rt/lib/scudo/standalone/release.h
    M compiler-rt/lib/scudo/standalone/size_class_map.h
    M compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
    M compiler-rt/lib/scudo/standalone/tests/primary_test.cpp
    M compiler-rt/lib/scudo/standalone/tests/release_test.cpp

  Log Message:
  -----------
  [scudo][standalone] Compact pointers for Caches/Batches

This CL introduces configuration options to allow pointers to be
compacted in the thread-specific caches and transfer batches. This
offers the possibility to have them use 32-bit of space instead of
64-bit for the 64-bit Primary, thus cutting the size of the caches
and batches by nearly half (and as such the memory used in size
class 0). The cost is an additional read from the region information
in the fast path.

This is not a new idea, as it's being used in the sanitizer_common
64-bit primary. The difference here is that it is configurable via
the allocator config, with the possibility of not compacting at all.

This CL enables compacting pointers in the Android and Fuchsia default
configurations.

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




More information about the All-commits mailing list