llvm-project/compiler-rt/lib/scudo
Kostya Kortchinsky e95ef87663 [scudo] Secondary allocator overhaul to support Windows
Summary:
The need for this change stems from the fact that Windows doesn't support
partial unmapping (`MEM_RELEASE` implies the entire allocated region). So we
now have to keep track of the reserved region and the committed region, so that
we can function without the trimming we did when dealing with larger alignments.

Instead of just having a `ReservedAddressRange` per chunk, we introduce a
`LargeChunkHeader` (and `LargeChunk` namespace) that additionally holds the
committed size and the usable size. The former is needed for stats purposes,
the latter is used by the frontend. Requiring both is debatable, we could only
work with the usable size but then be off by up to a page per chunk when
dealing with stats.

Additionally, we introduce more stats since they turned out to be useful for
experiments, and a `PrintStats` function that will be used by the combined
allocator in later patch.

Reviewers: alekseyshl, flowerhack

Reviewed By: alekseyshl

Subscribers: delcypher, #sanitizers, llvm-commits

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

llvm-svn: 327321
2018-03-12 19:29:38 +00:00
..
CMakeLists.txt [scudo] Use gc-sections by default 2018-03-06 20:13:37 +00:00
scudo_allocator.cpp [scudo] Make logging more consistent 2018-03-07 16:22:16 +00:00
scudo_allocator.h [scudo] Introduce Chunk::getHeaderSize 2018-02-27 16:14:49 +00:00
scudo_allocator_combined.h [scudo] Secondary allocator overhaul to support Windows 2018-03-12 19:29:38 +00:00
scudo_allocator_secondary.h [scudo] Secondary allocator overhaul to support Windows 2018-03-12 19:29:38 +00:00
scudo_crc32.cpp [scudo] CRC32 optimizations 2017-05-09 15:12:38 +00:00
scudo_crc32.h [sanitizer] Add Scudo to the sanitizer lint checks. 2017-11-08 16:42:29 +00:00
scudo_flags.cpp [scudo] Allow options to be defined at compile time 2018-02-08 16:29:48 +00:00
scudo_flags.h [scudo] 32-bit and hardware agnostic support 2016-11-30 17:32:20 +00:00
scudo_flags.inc [scudo] Quarantine overhaul 2017-07-24 15:29:38 +00:00
scudo_interface_internal.h [scudo] Add default implementations for weak functions 2018-01-30 17:59:49 +00:00
scudo_malloc.cpp [scudo] Overhaul malloc related interceptors 2018-01-25 20:42:44 +00:00
scudo_new_delete.cpp [scudo] Application & platform compatibility changes 2017-08-16 16:40:48 +00:00
scudo_platform.h [scudo] Allow for weak hooks, gated by a define 2018-01-23 23:07:42 +00:00
scudo_termination.cpp [scudo] Make logging more consistent 2018-03-07 16:22:16 +00:00
scudo_tsd.h [sanitizer] Introduce a vDSO aware timing function 2017-12-13 16:23:54 +00:00
scudo_tsd_exclusive.cpp [scudo] Allow for non-Android Shared TSD platforms, part 1 2017-10-12 15:01:09 +00:00
scudo_tsd_exclusive.inc [scudo] Scudo thread specific data refactor, part 3 2017-09-26 17:20:02 +00:00
scudo_tsd_shared.cpp [scudo] Make getNumberOfCPUs Fuchsia compliant v2 2017-11-21 21:14:00 +00:00
scudo_tsd_shared.inc [scudo] Allow for non-Android Shared TSD platforms, part 2 2017-10-13 20:55:31 +00:00
scudo_utils.cpp [scudo] Make logging more consistent 2018-03-07 16:22:16 +00:00
scudo_utils.h [scudo] Minor code generation improvement 2017-12-08 16:36:37 +00:00