diff --git a/documentation/hardened_malloc.xhtml b/documentation/hardened_malloc.xhtml index e0970ef..909e1ba 100644 --- a/documentation/hardened_malloc.xhtml +++ b/documentation/hardened_malloc.xhtml @@ -1,7 +1,7 @@ - + @@ -62,20 +62,21 @@

Increase Permitted Amount of Memory Pages

-

Add vm.max_map_count = 1048576 to /etc/sysctl.conf to accommodate - hardened_malloc's large amount of guard pages.

+

Add the following to /etc/sysctl.conf to accommodate + hardened_malloc's large amount of guard pages:

+
vm.max_map_count = 1048576

Clone hardened_malloc Source Code

-

$ git clone https://github.com/GrapheneOS/hardened_malloc.git

+
$ git clone https://github.com/GrapheneOS/hardened_malloc.git

Enter hardened_malloc Local Git Repository

-

$ cd hardened_malloc/

+
$ cd hardened_malloc/

Compile hardened_malloc

-

$ make <arguments>

+
$ make <arguments>

CONFIG_N_ARENA=n can be adjusted to increase parallel performance at the expense of memory usage, or decrease memory usage at the expense of parallel performance, where n is a non-negative integer. Higher values prefer parallel performance, @@ -117,14 +118,14 @@

Copy Compiled hardened_malloc Library

-

# cp out/libhardened_malloc.so /usr/local/lib/libhardened_malloc.so

+
# cp out/libhardened_malloc.so /usr/local/lib/libhardened_malloc.so

Set System to Preload hardened_malloc on Boot

-

musl-based systems: Add LD_PRELOAD=/usr/local/lib/libhardened_malloc.so to - /etc/environment

-

glibc-based systems: Add /usr/local/lib/libhardened_malloc.so to - /etc/ld.so.preload

+

musl-based systems: Add the following to /etc/environment:

+
LD_PRELOAD=/usr/local/lib/libhardened_malloc.so
+

glibc-based systems: Add the following to /etc/ld.so.preload:

+
/usr/local/lib/libhardened_malloc.so
Sitemap