mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-08-24 08:14:48 +03:00
Merge 09e73bfc63
into 189b0ac416
This commit is contained in:
commit
97a931de26
3 changed files with 209 additions and 15 deletions
|
@ -8,7 +8,16 @@
|
|||
int main() {
|
||||
mi_version(); // ensure mimalloc library is linked
|
||||
void* p1 = malloc(78);
|
||||
if (!mi_is_in_heap_region(p1)) {
|
||||
printf("p1: malloc failed to allocate in heap region\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
void* p2 = malloc(24);
|
||||
if (!mi_is_in_heap_region(p2)) {
|
||||
printf("p2: malloc failed to allocate in heap region\n");
|
||||
return 1;
|
||||
}
|
||||
free(p1);
|
||||
p1 = malloc(8);
|
||||
//char* s = strdup("hello\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue