mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Expose rpmalloc init/finalize functions.
This commit is contained in:
parent
1a1df0229d
commit
a467ef4c2b
@ -1709,7 +1709,7 @@ rp_thread_destructor(void* value) {
|
||||
#include <errno.h>
|
||||
|
||||
//! Initialize the allocator and setup global data
|
||||
extern inline int
|
||||
TRACY_API int
|
||||
rpmalloc_initialize(void) {
|
||||
if (_rpmalloc_initialized) {
|
||||
rpmalloc_thread_initialize();
|
||||
@ -1910,7 +1910,7 @@ rpmalloc_initialize_config(const rpmalloc_config_t* config) {
|
||||
}
|
||||
|
||||
//! Finalize the allocator
|
||||
void
|
||||
TRACY_API void
|
||||
rpmalloc_finalize(void) {
|
||||
atomic_thread_fence_acquire();
|
||||
|
||||
@ -1998,7 +1998,7 @@ rpmalloc_finalize(void) {
|
||||
}
|
||||
|
||||
//! Initialize thread, assign heap
|
||||
extern inline void
|
||||
TRACY_API void
|
||||
rpmalloc_thread_initialize(void) {
|
||||
if (!get_thread_heap_raw()) {
|
||||
heap_t* heap = _memory_allocate_heap();
|
||||
@ -2016,7 +2016,7 @@ rpmalloc_thread_initialize(void) {
|
||||
}
|
||||
|
||||
//! Finalize thread, orphan heap
|
||||
void
|
||||
TRACY_API void
|
||||
rpmalloc_thread_finalize(void) {
|
||||
heap_t* heap = get_thread_heap_raw();
|
||||
if (heap)
|
||||
|
@ -166,7 +166,7 @@ typedef struct rpmalloc_config_t {
|
||||
} rpmalloc_config_t;
|
||||
|
||||
//! Initialize allocator with default configuration
|
||||
RPMALLOC_EXPORT int
|
||||
TRACY_API int
|
||||
rpmalloc_initialize(void);
|
||||
|
||||
//! Initialize allocator with given configuration
|
||||
@ -178,15 +178,15 @@ RPMALLOC_EXPORT const rpmalloc_config_t*
|
||||
rpmalloc_config(void);
|
||||
|
||||
//! Finalize allocator
|
||||
RPMALLOC_EXPORT void
|
||||
TRACY_API void
|
||||
rpmalloc_finalize(void);
|
||||
|
||||
//! Initialize allocator for calling thread
|
||||
RPMALLOC_EXPORT void
|
||||
TRACY_API void
|
||||
rpmalloc_thread_initialize(void);
|
||||
|
||||
//! Finalize allocator for calling thread
|
||||
RPMALLOC_EXPORT void
|
||||
TRACY_API void
|
||||
rpmalloc_thread_finalize(void);
|
||||
|
||||
//! Perform deferred deallocations pending for the calling thread heap
|
||||
|
Loading…
Reference in New Issue
Block a user