[scudo] Change configuration for Trusty, use mmap()
authorDmitriy Filchenko <dmitriyf@google.com>
Mon, 5 Jun 2023 18:28:09 +0000 (18:28 +0000)
committerChia-hung Duan <chiahungduan@google.com>
Mon, 5 Jun 2023 18:28:10 +0000 (18:28 +0000)
commit94407e1bba9807193afde61c56b6125c0fc0b1d1
treee8451d0f8b969a6a60e2eb0a6442859db163c76f
parent540b934ff9a761677060b9c80bdd7dd303e74bbc
[scudo] Change configuration for Trusty, use mmap()

Trusty runs in memory constrained environments, with many apps
having only one page (4KB) of heap memory available. However, we
still want to mmap() multiples of PAGE_SIZE at a time.

Additionally, switch Scudo from using sbrk() to mmap().

Reviewed By: cferris

Differential Revision: https://reviews.llvm.org/D151968
compiler-rt/lib/scudo/standalone/allocator_config.h
compiler-rt/lib/scudo/standalone/size_class_map.h
compiler-rt/lib/scudo/standalone/trusty.cpp