diff options
Diffstat (limited to 'lib/Devel/Mwrap/trace_struct.h')
-rw-r--r-- | lib/Devel/Mwrap/trace_struct.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/Devel/Mwrap/trace_struct.h b/lib/Devel/Mwrap/trace_struct.h new file mode 100644 index 0000000..e5fe622 --- /dev/null +++ b/lib/Devel/Mwrap/trace_struct.h @@ -0,0 +1,34 @@ +enum tr_fn { + TR_FREE = 0, + TR_MEMALIGN = 1, + TR_MALLOC = 2, + TR_REALLOC = 3, + TR_CALLOC = 4, +}; +static const uintptr_t TR_MASK = 7; + +struct tr_memalign { + uintptr_t ret; + size_t alignment; + size_t size; +}; + +struct tr_free { + uintptr_t ptr; +}; + +struct tr_malloc { + uintptr_t ret; + size_t size; +}; + +struct tr_realloc { + uintptr_t ret; + uintptr_t ptr; + size_t size; +}; + +struct tr_calloc { + uintptr_t ret; + size_t size; +}; |