diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-05-14 04:58:28 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-05-14 04:58:28 +0300 |
commit | 96b60afcf4293db2e6841b58500fd12d0344e75f (patch) | |
tree | a0aecd475c1f9e73ff02f406d4ca761bcc2615f7 /configure.ac | |
parent | 6333590e0822ccb5e707e4784bfd19ecbae60840 (diff) | |
download | sciteco-96b60afcf4293db2e6841b58500fd12d0344e75f.tar.gz |
FreeBSD: fixed the poll-thread memory limiting implementation - it's the default now
* On FreeBSD both the dlmalloc replacement and poll-thread via sysctl() work
but the poll-thread has been benchmarked to be significantly faster,
at least on my machine.
You can still ./configure --enable-malloc-replacement of course.
* Interestingly, the RSS of the process visible via htop does not decrease
after OOMs or command-line terminations - with neither of the implementations.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index b8e6e38..18b878d 100644 --- a/configure.ac +++ b/configure.ac @@ -377,8 +377,10 @@ 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 - *-*-darwin* | *-mingw*) malloc_replacement=no;; + *-*-*bsd* | *-*-darwin* | *-mingw*) malloc_replacement=no;; *) malloc_replacement=yes;; esac fi @@ -422,8 +424,8 @@ else AC_DEFINE(HAVE_PROCFS, 1, [Whether procfs (/proc) is supported]) ;; *-*-*bsd*) - AC_CHECK_HEADERS([sys/types.h sys/sysctl.h]) - AC_CHECK_FUNCS([sysctl]) + AC_CHECK_HEADERS([sys/types.h sys/user.h sys/sysctl.h]) + AC_CHECK_FUNCS([sysconf sysctl]) ;; *-*-darwin*) AC_CHECK_HEADERS([mach/mach.h mach/message.h mach/kern_return.h mach/task_info.h]) |