1 #ifndef HAWKTRACER_ALLOC_H 2 #define HAWKTRACER_ALLOC_H 27 typedef void* (*realloc_function)(
void* ptr,
size_t size,
void* user_data);
74 #define HT_CREATE_TYPE(Type) (Type*)ht_alloc(sizeof(Type)) #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
HT_DECLS_BEGIN typedef void *(* realloc_function)(void *ptr, size_t size, void *user_data)
Callback function for a custom allocator.
Definition: alloc.h:27
HT_API void ht_free(void *ptr)
Releases memory allocated by ht_alloc.
HT_API void * ht_alloc(size_t size)
Allocates memory using HawkTracer allocator.
HT_API void ht_allocator_set(realloc_function func, void *user_data)
Sets a global allocator for HawkTracer library.
#define HT_DECLS_BEGIN
Defines a beginning of C linkage block.
Definition: macros.h:16
HT_API void * ht_realloc(void *ptr, size_t size)
Changes the size of the memory block.