about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-12-15 20:52:45 +0000
committerEric Wong <mwrap-perl@80x24.org>2022-12-16 09:27:43 +0000
commit87e065ede2bae2d72dc1c39e15d8f7a391d6dda3 (patch)
treeed288be9e4e5a8af13a4941a2b1370cddaf0da26
parentb34127ac831b7860e5505a95f4c254bf503f1df6 (diff)
downloadmwrap-87e065ede2bae2d72dc1c39e15d8f7a391d6dda3.tar.gz
-rw-r--r--mymalloc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/mymalloc.h b/mymalloc.h
index 7d94246..2e0517b 100644
--- a/mymalloc.h
+++ b/mymalloc.h
@@ -6,6 +6,19 @@
  * adds wait-free free(3) multi-threading support to avoid contention
  * with call_rcu.
 
+ * The wait-free free(3) implementation was proposed for inclusion into
+   glibc in 2018 and may eventually become part of glibc:
+   https://inbox.sourceware.org/libc-alpha/20180731084936.g4yw6wnvt677miti@dcvr/
+
+ * Arenas are thread-local and returned to a global pool upon thread
+   destruction.  This works well for processes with stable thread counts,
+   but wastes memory in processes with unstable thread counts.
+
+ * On Linux with O_TMPFILE support, all allocations are backed by
+   a temporary file (in TMPDIR).  This avoids OOM errors on
+   memory-constrained systems due to the higher-than-normal memory
+   usage of mwrap itself.
+
  * memalign-family support is ignored (and reimplemented in mwrap_core.h).
    dlmalloc's attempts to improve memory-efficiency is prone to fragmentation
    if memaligned-allocations are repeatedly freed and relalocated while