mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
merge from dev
This commit is contained in:
commit
92ffc25d79
65 changed files with 793 additions and 741 deletions
|
@ -44,7 +44,7 @@ int main() {
|
|||
p1 = mi_malloc(8);
|
||||
char* s = strdup("hello\n");
|
||||
free(p2);
|
||||
|
||||
|
||||
p2 = malloc(16);
|
||||
p1 = realloc(p1, 32);
|
||||
free(p1);
|
||||
|
@ -56,10 +56,10 @@ int main() {
|
|||
//free(p1);
|
||||
//p2 = malloc(32);
|
||||
//mi_free(p2);
|
||||
|
||||
|
||||
//mi_collect(true);
|
||||
//mi_stats_print(NULL);
|
||||
|
||||
|
||||
// test_process_info();
|
||||
return 0;
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ static void test_process_info(void) {
|
|||
size_t peak_rss = 0;
|
||||
size_t current_commit = 0;
|
||||
size_t peak_commit = 0;
|
||||
size_t page_faults = 0;
|
||||
size_t page_faults = 0;
|
||||
for (int i = 0; i < 100000; i++) {
|
||||
void* p = calloc(100,10);
|
||||
free(p);
|
||||
|
@ -188,7 +188,7 @@ static void negative_stat(void) {
|
|||
mi_stats_print_out(NULL, NULL);
|
||||
*p = 100;
|
||||
mi_free(p);
|
||||
mi_stats_print_out(NULL, NULL);
|
||||
mi_stats_print_out(NULL, NULL);
|
||||
}
|
||||
|
||||
static void alloc_huge(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue