10 ms·
Not Rust, but it's very easy to wrap malloc under gcc for this kind of thing (or something more useful). Compile with --wrap=malloc and: void *__real_mallo
by LiamPowell 3y ago
Not Rust, but it's very easy to wrap malloc under gcc for this kind of thing (or something more useful). Compile with --wrap=malloc and:
void *__real_malloc(size_t);
void *__wrap_malloc(size_t size) {
...
return __real_malloc(size);
}
- andrewmcwatters 3y agoThank you for sharing this!