for windows dynamic override, add standard api override and stop patching new/delete (for now)

This commit is contained in:
daan 2019-07-04 09:29:33 -07:00
parent 6abdc5f5a3
commit 3039dbfcdd
3 changed files with 55 additions and 34 deletions

View file

@ -12,6 +12,14 @@ void free_p() {
return;
}
class Test {
private:
int i;
public:
Test(int x) { i = x; }
~Test() { }
};
int main() {
mi_stats_reset();
atexit(free_p);
@ -26,8 +34,10 @@ int main() {
free(p1);
free(p2);
free(s);
Test* t = new Test(42);
delete t;
mi_collect(true);
mi_stats_print(NULL);
// mi_stats_print(NULL); // MIMALLOC_VERBOSE env is set to 2
return 0;
}