This commit is contained in:
Eduard Voronkin 2025-06-13 19:33:22 +02:00 committed by GitHub
commit 97a931de26
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: B5690EEEBB952194
3 changed files with 209 additions and 15 deletions

View file

@ -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");