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.
This commit is contained in:
Nick Mathewson 2017-04-28 10:53:05 -04:00
parent 00a12337ff
commit 531835f561
2 changed files with 7 additions and 1 deletions

6
changes/bug22096 Normal file
View file

@ -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.

View file

@ -20,7 +20,7 @@
#endif #endif
/** Malloc mprotect limit in bytes. */ /** Malloc mprotect limit in bytes. */
#define MALLOC_MP_LIM 1048576 #define MALLOC_MP_LIM (16*1024*1024)
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>