mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 06:59:32 +03:00
add check to see if we truly override the system malloc
This commit is contained in:
parent
d2a2508af3
commit
4c87643c29
1 changed files with 7 additions and 0 deletions
|
@ -20,6 +20,13 @@ int main() {
|
||||||
free(p2);
|
free(p2);
|
||||||
free(s);
|
free(s);
|
||||||
mi_collect(true);
|
mi_collect(true);
|
||||||
|
|
||||||
|
/* now test if override worked by allocating/freeing across the api's*/
|
||||||
|
p1 = mi_malloc(32);
|
||||||
|
free(p1);
|
||||||
|
p2 = malloc(32);
|
||||||
|
mi_free(p2);
|
||||||
|
|
||||||
mi_stats_print(NULL);
|
mi_stats_print(NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue