[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Increase MALLOC_MP_LIM to 16MB



commit 531835f5611994def74d790f43df01d828724513
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Apr 28 10:53:05 2017 -0400

    Increase MALLOC_MP_LIM to 16MB
    
    Increase the maximum allowed size passed to mprotect(PROT_WRITE)
    from 1MB to 16MB. This was necessary with the glibc allocator
    in order to allow worker threads to allocate more memory --
    which in turn is necessary because of our new use of worker
    threads for compression.
    
    Closes ticket #22096. Found while working on #21648.
---
 changes/bug22096     | 6 ++++++
 src/common/sandbox.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/changes/bug22096 b/changes/bug22096
new file mode 100644
index 0000000..83dac9c
--- /dev/null
+++ b/changes/bug22096
@@ -0,0 +1,6 @@
+  o Minor features (linux seccomp2 sandbox):
+    - Increase the maximum allowed size passed to mprotect(PROT_WRITE)
+      from 1MB to 16MB. This was necessary with the glibc allocator in
+      order to allow worker threads to allocate more memory -- which in
+      turn is necessary because of our new use of worker threads for
+      compression. Closes ticket 22096.
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index ddb1f02..ab2de52 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -20,7 +20,7 @@
 #endif
 
 /** Malloc mprotect limit in bytes. */
-#define MALLOC_MP_LIM 1048576
+#define MALLOC_MP_LIM (16*1024*1024)
 
 #include <stdio.h>
 #include <string.h>



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits