[scudo][standalone] Shift some data from dynamic to static

Authored by cryptoad on Feb 16 2020, 3:29 PM.


[scudo][standalone] Shift some data from dynamic to static

Most of our larger data is dynamically allocated (via map) but it
became an hindrance with regard to init time, for a cost to benefit
ratio that is not great. So change the TSDs, RegionInfo, ByteMap
to be static.

Additionally, for reclaiming, we used mapped & unmapped a buffer each
time, which is costly. It turns out that we can have a static buffer,
and that there isn't much contention on it.

One of the other things changed here, is that we hard set the number
of TSDs on Android to the maximum number, as there could be a
situation where cores are put to sleep and we could miss some.

Subscribers: mgorny, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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