Hi,
I would like to debug memory allocations at runtime.
Is there some kind of callback we can provide to instrumentalize our code ?
Something like:
// Starting from here, memory allocations are not allowed
mi_set_option(mi_option_enable_allocations, 0);
auto* p = malloc(100); /// --> calls abort() or throws an exception
void on_alloc() {
std::print("Allocations detected !");
}
// Setup a callback for anything allocation related
mi_set_callback(&on_alloc);
auto* p = malloc(100); /// --> calls on_alloc()
Hi, I would like to debug memory allocations at runtime. Is there some kind of callback we can provide to instrumentalize our code ? Something like:
Thanks for your help !