mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
for windows dynamic override, add standard api override and stop patching new/delete (for now)
This commit is contained in:
parent
6abdc5f5a3
commit
3039dbfcdd
3 changed files with 55 additions and 34 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue