Tilde Friends
mem.h
1#pragma once
2
11#include <stdbool.h>
12#include <stddef.h>
13#include <stdint.h>
14
17
23void tf_mem_startup(bool tracking);
24
29
34
40
45
51
56
62
68
74void* tf_malloc(size_t size);
75
82void* tf_realloc(void* ptr, size_t size);
83
88void tf_free(void* ptr);
89
95char* tf_strdup(const char* string);
96
104void* tf_resize_vec(void* ptr, size_t size);
105
111
117
123void tf_mem_walk_allocations(void (*callback)(void* ptr, size_t size, int frames_count, void* const* frames, void* user_data), void* user_data);
124
129{
131 uint32_t stack_hash;
133 int count;
135 size_t size;
137 void* frames[32];
141
148
char * tf_strdup(const char *string)
size_t tf_mem_get_uv_malloc_size()
void * tf_malloc(size_t size)
struct JSMallocFunctions JSMallocFunctions
Definition: mem.h:16
size_t tf_mem_get_tls_malloc_size()
void tf_mem_startup(bool tracking)
void tf_mem_replace_sqlite_allocator()
struct _tf_mem_allocation_t tf_mem_allocation_t
size_t tf_mem_get_tf_malloc_size()
tf_mem_allocation_t * tf_mem_summarize_allocations(int *out_count)
void * tf_resize_vec(void *ptr, size_t size)
void tf_mem_shutdown()
void tf_get_js_malloc_functions(JSMallocFunctions *out)
size_t tf_mem_get_js_malloc_size()
void tf_mem_replace_uv_allocator()
void tf_mem_replace_tls_allocator()
void tf_free(void *ptr)
void * tf_realloc(void *ptr, size_t size)
void tf_mem_walk_allocations(void(*callback)(void *ptr, size_t size, int frames_count, void *const *frames, void *user_data), void *user_data)
size_t tf_mem_get_sqlite_malloc_size()
Definition: mem.h:129
uint32_t stack_hash
Definition: mem.h:131
int frames_count
Definition: mem.h:139
void * frames[32]
Definition: mem.h:137
int count
Definition: mem.h:133
size_t size
Definition: mem.h:135