Skip to content

Commit da260ab

Browse files
committed
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
1 parent 6371645 commit da260ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contrib/jemalloc/src/mutex.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pthread_create(pthread_t *__restrict thread,
4242
JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
4343
void *(calloc_cb)(size_t, size_t));
4444

45+
#ifndef JEMALLOC_NO_PRIVATE_NAMESPACE
4546
#pragma weak _pthread_mutex_init_calloc_cb
4647
int
4748
_pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
@@ -53,6 +54,7 @@ _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
5354
calloc_cb));
5455
}
5556
#endif
57+
#endif
5658

5759
void
5860
malloc_mutex_lock_slow(malloc_mutex_t *mutex) {

0 commit comments

Comments
 (0)