MCPcopy Create free account
hub / github.com/crossuo/crossuo / rpmalloc_thread_initialize

Function rpmalloc_thread_initialize

external/tracy/client/tracy_rpmalloc.cpp:1996–2011  ·  view source on GitHub ↗

Initialize thread, assign heap

Source from the content-addressed store, hash-verified

1994
1995//! Initialize thread, assign heap
1996extern inline void
1997rpmalloc_thread_initialize(void) {
1998 if (!get_thread_heap_raw()) {
1999 heap_t* heap = _memory_allocate_heap();
2000 if (heap) {
2001 atomic_thread_fence_acquire();
2002#if ENABLE_STATISTICS
2003 atomic_incr32(&_memory_active_heaps);
2004#endif
2005 set_thread_heap(heap);
2006#if defined(_MSC_VER) && !defined(__clang__) && (!defined(BUILD_DYNAMIC_LINK) || !BUILD_DYNAMIC_LINK)
2007 FlsSetValue(fls_key, heap);
2008#endif
2009 }
2010 }
2011}
2012
2013//! Finalize thread, orphan heap
2014void

Callers 6

rpmalloc_initializeFunction · 0.85
RPMallocInitMethod · 0.85
InitRPMallocThreadFunction · 0.85
WorkerMethod · 0.85
CompressWorkerMethod · 0.85

Calls 4

get_thread_heap_rawFunction · 0.85
_memory_allocate_heapFunction · 0.85
atomic_incr32Function · 0.85
set_thread_heapFunction · 0.85

Tested by

no test coverage detected