vm: explicitly initialise kmalloc in vm_bootstrap

if kmalloc is called with count=N before vm_bootstrap is finished,
the request will be fulfilled using memblock_alloc.

if N is a power of 2, the returned pointer will be aligned to
an N-byte boundary.
This commit is contained in:
2023-02-06 20:46:38 +00:00
parent fe0b7e043f
commit 0516ef06a3
3 changed files with 36 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ kern_status_t vm_bootstrap(const vm_zone_descriptor_t *zones, size_t nr_zones)
vm_zone_init(&node_data->pg_zones[zones[i].zd_id], &zones[i]);
}
kmalloc_init();
return KERN_OK;
}