diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-28 10:53:05 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-28 10:55:10 -0400 |
commit | 531835f5611994def74d790f43df01d828724513 (patch) | |
tree | 0eaef3ff7ca2988c69c2a9382f8189e2d027283c | |
parent | 00a12337ff068d47d92352541665ee73cbd9ff4b (diff) | |
download | tor-531835f5611994def74d790f43df01d828724513.tar.gz tor-531835f5611994def74d790f43df01d828724513.zip |
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.
-rw-r--r-- | changes/bug22096 | 6 | ||||
-rw-r--r-- | src/common/sandbox.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/changes/bug22096 b/changes/bug22096 new file mode 100644 index 0000000000..83dac9c3f5 --- /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 ddb1f02b05..ab2de52592 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> |