DivestOS/Patches/LineageOS-15.1/android_system_core/0002-HM-Increase_vm_mmc.patch
Tad a53062ca0b Backports
Adds ptrace_scope and timeout options to 17.1, tested working

Also adds hardened_malloc to 15.1, but failing to compile:
external/hardened_malloc/h_malloc.c:1688:18: error: use of undeclared identifier 'M_PURGE'
    if (param == M_PURGE) {
                 ^
external/hardened_malloc/h_malloc.c:1743:30: error: missing field 'ordblks' initializer [-Werror,-Wmissing-field-initializers]
    struct mallinfo info = {0};
                             ^

Signed-off-by: Tad <tad@spotco.us>
2022-03-21 18:06:49 -04:00

23 lines
744 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
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
index 7d618af63..f9eb3d198 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -572,6 +572,8 @@ on boot
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