Skip to content

Commit 12f7257

Browse files
doc: Be vague instead of wrong about MALLOC_ARENA_MAX
Before this commit, we claim that glibc's malloc implementation uses 2 arenas by default. But that's true only on 32-bit systems, and even there, it uses *up* to 2 arenas. This commit fixes the wrong statement. The new statement is intentionally vague to reduce our maintenance burden. For details, see: https://www.gnu.org/software/libc/manual/html_node/Memory-Allocation-Tunables.html#index-glibc_002emalloc_002earena_005fmax Noticed in: bitcoin/bitcoin#27642 (comment)
1 parent 99ce836 commit 12f7257

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/reduce-memory.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ threads take up 8MiB for the thread stack on a 64-bit system, and 4MiB in a
4343

4444
## Linux specific
4545

46-
By default, glibc will create up to two heap arenas per core. This is known to cause excessive memory usage in some scenarios. To avoid this make a script that sets `MALLOC_ARENA_MAX` before starting bitcoind:
46+
By default, glibc's implementation of `malloc` may use more than one arena. This is known to cause excessive memory usage in some scenarios. To avoid this, make a script that sets `MALLOC_ARENA_MAX` before starting bitcoind:
4747

4848
```bash
4949
#!/usr/bin/env bash

0 commit comments

Comments
 (0)