mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
Expose mi prefixed public standard implementations of various posix, unix, and c++ allocation functions. See issue #75
This commit is contained in:
parent
5ff037f8f8
commit
dd59a917ce
11 changed files with 137 additions and 87 deletions
|
@ -21,7 +21,7 @@ public:
|
|||
};
|
||||
|
||||
int main() {
|
||||
mi_stats_reset();
|
||||
mi_stats_reset();
|
||||
atexit(free_p);
|
||||
void* p1 = malloc(78);
|
||||
void* p2 = malloc(24);
|
||||
|
@ -36,8 +36,10 @@ int main() {
|
|||
free(s);
|
||||
Test* t = new Test(42);
|
||||
delete t;
|
||||
int err = mi_posix_memalign(&p1,32,60);
|
||||
if (!err) free(p);
|
||||
mi_collect(true);
|
||||
// mi_stats_print(NULL); // MIMALLOC_VERBOSE env is set to 2
|
||||
mi_stats_print(NULL); // MIMALLOC_VERBOSE env is set to 2
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <rcmalloc.h>
|
||||
|
||||
int main() {
|
||||
void* p1 = rc_malloc(16);
|
||||
void* p2 = rc_malloc(16);
|
||||
rc_free(p1);
|
||||
rc_free(p2);
|
||||
p1 = rc_malloc(16);
|
||||
p2 = rc_malloc(16);
|
||||
rc_free(p1);
|
||||
rc_free(p2);
|
||||
rc_collect(true);
|
||||
rc_stats_print();
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue