git: da260ab23f26 - main - jemalloc: Only replace _pthread_mutex_init_calloc_cb in private namespace
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 15 Aug 2025 21:27:37 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=da260ab23f26cea5569ff8ecd83eeb49411af233
commit da260ab23f26cea5569ff8ecd83eeb49411af233
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-08-15 21:23:36 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-08-15 21:24:46 +0000
jemalloc: Only replace _pthread_mutex_init_calloc_cb in private namespace
When we're not doing the private namespace remap, we don't need to do
this pragma. This is needed for the bootstrapping path when we import a
new version of jemalloc.
No functional change.
Sponsored by: Netflix
---
contrib/jemalloc/src/mutex.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/jemalloc/src/mutex.c b/contrib/jemalloc/src/mutex.c
index 88a7730c64c1..6e2989aa4d9f 100644
--- a/contrib/jemalloc/src/mutex.c
+++ b/contrib/jemalloc/src/mutex.c
@@ -42,6 +42,7 @@ pthread_create(pthread_t *__restrict thread,
JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
void *(calloc_cb)(size_t, size_t));
+#ifndef JEMALLOC_NO_PRIVATE_NAMESPACE
#pragma weak _pthread_mutex_init_calloc_cb
int
_pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
@@ -53,6 +54,7 @@ _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
calloc_cb));
}
#endif
+#endif
void
malloc_mutex_lock_slow(malloc_mutex_t *mutex) {