// Basically a program which does do nothing (I.E., there can't be memory leaks caused by the program itself ...)
#include <rpmalloc.h>
int main(int argc, char** argv) {
rpmalloc_linker_reference();
return 0;
}
Result (on Ubuntu 22.04 LTS) when compiled w/ -DENABLE_ASSERTS=1 -DENABLE_OVERRIDE=1 -DENABLE_PRELOAD=1:
Test program:
Result (on Ubuntu 22.04 LTS) when compiled w/
-DENABLE_ASSERTS=1 -DENABLE_OVERRIDE=1 -DENABLE_PRELOAD=1
:Result when compiled w/
-DENABLE_ASSERTS=1 -DENABLE_OVERRIDE=0 -DENABLE_PRELOAD=0
:The "supposed" memory leak is thus most likely caused by the OS loader itself (and not the program).
Suggestion: Add
to all memory leak asserts.