1 #ifndef HAWKTRACER_ALLOC_HOOKS_H 2 #define HAWKTRACER_ALLOC_HOOKS_H 5 #include <hawktracer/ht_config.h> 7 #ifdef HT_PLATFORM_FEATURE_ALLOC_HOOKS_ENABLED 20 typedef void(*HT_AllocHookMalloc)(
void* ret_ptr,
size_t size,
void* user_data);
30 typedef void(*HT_AllocHookCalloc)(
void* ret_ptr,
size_t num,
size_t size,
void* user_data);
40 typedef void(*HT_AllocHookRealloc)(
void* ret_ptr,
void* ptr,
size_t size,
void* user_data);
48 typedef void(*HT_AllocHookFree)(
void* ptr,
void* user_data);
63 HT_API void ht_alloc_hooks_register_hooks(HT_AllocHookMalloc pre_malloc_hook,
64 HT_AllocHookMalloc post_malloc_hook,
65 HT_AllocHookCalloc pre_calloc_hook,
66 HT_AllocHookCalloc post_calloc_hook,
67 HT_AllocHookRealloc pre_realloc_hook,
68 HT_AllocHookRealloc post_realloc_hook,
69 HT_AllocHookFree pre_free_hook,
70 HT_AllocHookFree post_free_hook,
80 HT_API void *ht_alloc_hooks_malloc_skip_hook(
size_t size);
90 HT_API void *ht_alloc_hooks_calloc_skip_hook(
size_t num,
size_t size);
100 HT_API void *ht_alloc_hooks_realloc_skip_hook(
void* ptr,
size_t size);
106 HT_API void ht_alloc_hooks_free_skip_hook(
void* ptr);
#define HT_API
Defines a directive for exporting/importing symbols from DLL.
Definition: macros.h:76
#define HT_DECLS_END
Defines an end of C linkage block.
Definition: macros.h:17
#define HT_DECLS_BEGIN
Defines a beginning of C linkage block.
Definition: macros.h:16