[all-commits] [llvm/llvm-project] 20c1f9: [scudo] Separate Fuchsia & Default SizeClassMap

Kostya Kortchinsky via All-commits all-commits at lists.llvm.org
Mon May 24 08:54:39 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 20c1f94220d938936867cb047fb6444a187626ba
      https://github.com/llvm/llvm-project/commit/20c1f94220d938936867cb047fb6444a187626ba
  Author: Kostya Kortchinsky <kostyak at google.com>
  Date:   2021-05-24 (Mon, 24 May 2021)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/allocator_config.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/size_class_map_test.cpp

  Log Message:
  -----------
  [scudo] Separate Fuchsia & Default SizeClassMap

The Fuchsia allocator config was using the default size class map.

This CL gives Fuchsia its own size class map and changes a couple of
things in the default one:
- make `SizeDelta` configurable in `Config` for a fixed size class map
  as it currently is for a table size class map;
- switch `SizeDelta` to 0 for the default config, it allows for size
  classes that allow for power of 2s, and overall better wrt pages
  filling;
- increase the max number of caches pointers to 14 in the default,
  this makes the transfer batch 64/128 bytes on 32/64-bit platforms,
  which is cache-line friendly (previous size was 48/96 bytes).

The Fuchsia size class map remains untouched for now, this doesn't
impact Android which uses the table size class map.

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




More information about the All-commits mailing list