2022-03-15 21:07:25 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2019-04-04 04:31:47 +00:00
|
|
|
From: Daniel Micay <danielmicay@gmail.com>
|
|
|
|
Date: Thu, 13 Dec 2018 09:26:25 -0500
|
|
|
|
Subject: [PATCH] increase max_map_count for hardened malloc
|
|
|
|
|
|
|
|
---
|
|
|
|
rootdir/init.rc | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
2022-03-15 21:07:25 +00:00
|
|
|
index 4ed148857..eca5a9f9c 100644
|
2019-04-04 04:31:47 +00:00
|
|
|
--- a/rootdir/init.rc
|
|
|
|
+++ b/rootdir/init.rc
|
2022-03-15 21:07:25 +00:00
|
|
|
@@ -607,6 +607,8 @@ on boot
|
2019-04-04 04:31:47 +00:00
|
|
|
chown root system /sys/module/lowmemorykiller/parameters/minfree
|
|
|
|
chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
|
|
|
|
|
|
|
|
+ write /proc/sys/vm/max_map_count 524240
|
|
|
|
+
|
|
|
|
# Tweak background writeout
|
|
|
|
write /proc/sys/vm/dirty_expire_centisecs 200
|
|
|
|
write /proc/sys/vm/dirty_background_ratio 5
|