MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / background_thread_boot0

Function background_thread_boot0

deps/memkind/src/jemalloc/src/background_thread.c:812–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810#endif /* defined(JEMALLOC_BACKGROUND_THREAD) */
811
812bool
813background_thread_boot0(void) {
814 if (!have_background_thread && opt_background_thread) {
815 malloc_printf("<jemalloc>: option background_thread currently "
816 "supports pthread only\n");
817 return true;
818 }
819
820#ifdef JEMALLOC_PTHREAD_CREATE_WRAPPER
821 pthread_create_fptr = dlsym(RTLD_NEXT, "pthread_create");
822 if (pthread_create_fptr == NULL) {
823 can_enable_background_thread = false;
824 if (config_lazy_lock || opt_background_thread) {
825 malloc_write("<jemalloc>: Error in dlsym(RTLD_NEXT, "
826 "\"pthread_create\")\n");
827 abort();
828 }
829 } else {
830 can_enable_background_thread = true;
831 }
832#endif
833 return false;
834}
835
836bool
837background_thread_boot1(tsdn_t *tsdn) {

Callers 1

Calls 2

malloc_printfFunction · 0.70
malloc_writeFunction · 0.70

Tested by

no test coverage detected