[PATCH] D102783: [scudo] Separate Fuchsia & Default SizeClassMap

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 19 09:13:27 PDT 2021


cryptoad created this revision.
cryptoad added reviewers: hctim, pcc, cferris, eugenis.
Herald added a subscriber: phosek.
cryptoad requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102783

Files:
  compiler-rt/lib/scudo/standalone/allocator_config.h
  compiler-rt/lib/scudo/standalone/size_class_map.h
  compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
  compiler-rt/lib/scudo/standalone/tests/size_class_map_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102783.346483.patch
Type: text/x-patch
Size: 5077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210519/440f8e65/attachment.bin>


More information about the llvm-commits mailing list