The following is excerpted from AddressSanitizerAlgorithm:
AddressSanitizer maps 8 bytes of the application memory into 1 byte of the shadow memory.
It means if you use ASAN_POISON_MEMORY_REGION
/ASAN_UNPOISON_MEMORY_REGION
(please refer AddressSanitizerManualPoisoning), you should take shadow memory usage into account if application memory is huge. E.g., my application occupies ~216 GiB
, the shadow memory will occupy about 216 / 8 = 27 GiB
.