]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/interpose-malloc.dtest/interposer.c
ceac97988525c22e66b84bb62054f4b2e4ca0dd4
3 #include <mach-o/dyld-interposing.h>
9 void* mymalloc(size_t size
)
11 // bump ptr allocate twice the size and fill second half with '#'
16 p
= (char*)(((long)p
+ 15) & (-16)); // 16-byte align next malloc
24 DYLD_INTERPOSE(mymalloc
, malloc
)
25 DYLD_INTERPOSE(myfree
, free
)