Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1393)

Unified Diff: src/platform-linux.cc

Issue 132623005: A64: Synchronize with r18642. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-visiting-inl.h ('k') | src/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-linux.cc
diff --git a/src/platform-linux.cc b/src/platform-linux.cc
index 2b7d10f3b292b64fb061988f1c2ce84ff54cc01f..0633fe6f78b955d94e0afd98f28c13ab90e3bc67 100644
--- a/src/platform-linux.cc
+++ b/src/platform-linux.cc
@@ -58,6 +58,10 @@
#include <asm/sigcontext.h>
#endif
+#if defined(LEAK_SANITIZER)
+#include <sanitizer/lsan_interface.h>
+#endif
+
#undef MAP_TYPE
#include "v8.h"
@@ -349,6 +353,9 @@ VirtualMemory::VirtualMemory(size_t size, size_t alignment)
address_ = static_cast<void*>(aligned_base);
size_ = aligned_size;
+#if defined(LEAK_SANITIZER)
+ __lsan_register_root_region(address_, size_);
+#endif
}
@@ -398,6 +405,9 @@ void* VirtualMemory::ReserveRegion(size_t size) {
if (result == MAP_FAILED) return NULL;
+#if defined(LEAK_SANITIZER)
+ __lsan_register_root_region(result, size);
+#endif
return result;
}
@@ -434,6 +444,9 @@ bool VirtualMemory::UncommitRegion(void* base, size_t size) {
bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
+#if defined(LEAK_SANITIZER)
+ __lsan_unregister_root_region(base, size);
+#endif
return munmap(base, size) == 0;
}
« no previous file with comments | « src/objects-visiting-inl.h ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698