From 28c63a2f21c7729c8dbd52bc6f005f6c2e30087c Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Fri, 26 Aug 2016 23:58:42 +0000 Subject: [asan] first attempt at releasing free-d memory back to the system using madvise. Requires quite some tuning. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@279887 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/msan/msan_allocator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/msan/msan_allocator.cc') diff --git a/lib/msan/msan_allocator.cc b/lib/msan/msan_allocator.cc index f5d59047b..2b81efc3e 100644 --- a/lib/msan/msan_allocator.cc +++ b/lib/msan/msan_allocator.cc @@ -33,9 +33,9 @@ struct MsanMapUnmapCallback { // We are about to unmap a chunk of user memory. // Mark the corresponding shadow memory as not needed. - FlushUnneededShadowMemory(MEM_TO_SHADOW(p), size); + ReleaseMemoryToOS(MEM_TO_SHADOW(p), size); if (__msan_get_track_origins()) - FlushUnneededShadowMemory(MEM_TO_ORIGIN(p), size); + ReleaseMemoryToOS(MEM_TO_ORIGIN(p), size); } }; -- cgit v1.2.3