Re:Stupid alloc – what if memory allocation was annoying
by jswrenn on Sunday July 09, 2023 @12:47AM
(#36651599)
It already exists! https://github.com/cuviper/alloc_geiger
Re:Stupid alloc – what if memory allocation was annoying
by andrewmcwatters on Sunday July 09, 2023 @12:53AM
(#36651622)
Hahaha, perfect! Edit: Wow, I love that this does specifically that, too.
Re:Stupid alloc – what if memory allocation was annoying
by LiamPowell on Sunday July 09, 2023 @01:55AM
(#36651965)
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);
}
Re:Stupid alloc – what if memory allocation was annoying
by andrewmcwatters on Sunday July 09, 2023 @04:04PM
(#36658321)
Thank you for sharing this!
[1]: https://en.m.wikipedia.org/wiki/Bell_character