sandbox: vm: add cache allocator, generic size-N caches for kmalloc()
This commit is contained in:
@@ -174,9 +174,6 @@ int memory_test(void)
|
||||
print_free_pages(&pg_data->pg_zones[i]);
|
||||
}
|
||||
|
||||
printf("all pages:\n");
|
||||
print_all_pages();
|
||||
|
||||
vm_page_t *pg = vm_page_alloc(VM_PAGE_128K, 0);
|
||||
printf("allocated 128K at 0x%lx\n", vm_page_get_paddr(pg));
|
||||
|
||||
@@ -242,6 +239,9 @@ int memory_test(void)
|
||||
}
|
||||
}
|
||||
|
||||
void *p = kmalloc(32, 0);
|
||||
printf("allocated 32 bytes at %p\n", p);
|
||||
|
||||
munmap(system_memory, MB_TO_BYTES(MEMORY_SIZE_MB));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user