[msan] Implement __sanitizer_get_current_allocated_bytes
authorVitaly Buka <vitalybuka@google.com>
Wed, 24 May 2023 17:35:34 +0000 (10:35 -0700)
committerVitaly Buka <vitalybuka@google.com>
Wed, 24 May 2023 17:50:32 +0000 (10:50 -0700)
commit4305f640f0e5d4c27b7787407bc84c80552fed11
tree7584126903b16a4c3d846d800f8b5b5a17dab874
parent9357712b50583b10e315ca59293803f9f012dda5
[msan] Implement __sanitizer_get_current_allocated_bytes

__sanitizer_get_current_allocated_bytes had as body, but allocator
caches were not registered to collect stats. It's done by
SizeClassAllocator64LocalCache::Init().

Reviewed By: kstoimenov

Differential Revision: https://reviews.llvm.org/D151352
compiler-rt/lib/msan/msan_allocator.cpp
compiler-rt/lib/msan/msan_allocator.h
compiler-rt/lib/msan/msan_thread.cpp
compiler-rt/test/sanitizer_common/TestCases/allocator_interface.cpp