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

Function rpmalloc_thread_initialize

source/extern/rpmalloc.c:3042–3054  ·  view source on GitHub ↗

Initialize thread, assign heap

Source from the content-addressed store, hash-verified

3040
3041//! Initialize thread, assign heap
3042extern inline void
3043rpmalloc_thread_initialize(void) {
3044 if (!get_thread_heap_raw()) {
3045 heap_t* heap = _rpmalloc_heap_allocate(0);
3046 if (heap) {
3047 _rpmalloc_stat_inc(&_memory_active_heaps);
3048 set_thread_heap(heap);
3049#if defined(_WIN32) && (!defined(BUILD_DYNAMIC_LINK) || !BUILD_DYNAMIC_LINK)
3050 FlsSetValue(fls_key, heap);
3051#endif
3052 }
3053 }
3054}
3055
3056//! Finalize thread, orphan heap
3057void

Callers 5

DllMainFunction · 0.85
thread_starterFunction · 0.85
pthread_createFunction · 0.85
rpmalloc_initializeFunction · 0.85

Calls 3

get_thread_heap_rawFunction · 0.85
_rpmalloc_heap_allocateFunction · 0.85
set_thread_heapFunction · 0.85

Tested by

no test coverage detected