aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-07-20 13:57:16 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-07-20 14:06:57 +0300
commit2ed6c3d1afbe33459cde8855299d3c327ffa30dc (patch)
tree8902c7511b485e0b4132b436239a5f03788f50ba /configure.ac
parent20aef26f311cc04550cc188e237c9288d5fb7b72 (diff)
downloadsciteco-2ed6c3d1afbe33459cde8855299d3c327ffa30dc.tar.gz
FreeBSD: enable dlmalloc by default (--enable-malloc-replacement)
* After re-benchmarking the performance, I in fact detected a 20-25% speedup if memory limiting is active. Both using `time` and the builtin monotic timer ::^B. When memory limiting is disabled, there is no detectable difference to jemalloc. The following test case was used: sciteco -e '::^BUs 100000<@^U[^E\a]"^E\a" %a> ::^B-Qs=' * I also played around with getrusage(), but it doesn't seem to be a viable API for detecting the currently used RSS, i.e. it does not allow recovering from OOMs.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 1 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 8620050..7320ffe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -410,10 +410,8 @@ AC_ARG_ENABLE(malloc-replacement,
[malloc_replacement=$enableval], [malloc_replacement=check])
if [[ $malloc_replacement = check ]]; then
# We currently do not support dlmalloc on Windows and Mac OS.
- # It works on FreeBSD, but is slower than the polling fallback,
- # it has been disabled by default.
case $host in
- *-*-*bsd* | *-*-darwin* | *-mingw*) malloc_replacement=no;;
+ *-*-darwin* | *-mingw*) malloc_replacement=no;;
*) malloc_replacement=yes;;
esac
fi