mwrap-perl.git  about / heads / tags
LD_PRELOAD malloc wrapper + line stats for Perl
blob e5fe622267a60c751e874f83a4098a47c5ddadaa 420 bytes (raw)
$ git show HEAD:lib/Devel/Mwrap/trace_struct.h	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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;
};

git clone https://80x24.org/mwrap-perl.git