Initialize thread, assign heap
| 3040 | |
| 3041 | //! Initialize thread, assign heap |
| 3042 | extern inline void |
| 3043 | rpmalloc_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 |
| 3057 | void |
no test coverage detected