diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-10-22 14:31:30 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-10-22 14:31:30 +0000 |
commit | 7c6bd4060e60f5b148cc629c8791c2a8bf3d3347 (patch) | |
tree | d922b16460dc2f7e1256795feaed1df398978aa8 /lib/msan/msan_allocator.cc | |
parent | 285d458935bc2f9d8ec1109de01ed66185062349 (diff) |
[msan] Drain allocator cache when leaving thread.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan_allocator.cc')
-rw-r--r-- | lib/msan/msan_allocator.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/msan/msan_allocator.cc b/lib/msan/msan_allocator.cc index 04d6fedb2..2badf7121 100644 --- a/lib/msan/msan_allocator.cc +++ b/lib/msan/msan_allocator.cc @@ -46,6 +46,10 @@ static inline void Init() { allocator.Init(); } +void MsanAllocatorThreadFinish() { + allocator.SwallowCache(&cache); +} + static void *MsanAllocate(StackTrace *stack, uptr size, uptr alignment, bool zeroise) { Init(); |