2017-03-02 14:12:46 +00:00
|
|
|
--- base/allocator/partition_allocator/page_allocator.cc.orig
|
|
|
|
+++ base/allocator/partition_allocator/page_allocator.cc
|
|
|
|
@@ -17,6 +17,11 @@
|
2016-08-28 22:03:52 +00:00
|
|
|
#include <errno.h>
|
|
|
|
#include <sys/mman.h>
|
|
|
|
|
2017-03-02 14:12:46 +00:00
|
|
|
+#if defined(OS_LINUX) && defined(MADV_FREE)
|
2016-08-28 22:03:52 +00:00
|
|
|
+// Added in Linux 4.5, but it breaks the sandbox.
|
|
|
|
+#undef MADV_FREE
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#ifndef MADV_FREE
|
|
|
|
#define MADV_FREE MADV_DONTNEED
|
|
|
|
#endif
|