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:
@@ -234,6 +234,7 @@ extern void vm_cache_destroy(vm_cache_t *cache);
|
||||
extern void *vm_cache_alloc(vm_cache_t *cache, vm_flags_t flags);
|
||||
extern void vm_cache_free(vm_cache_t *cache, void *p);
|
||||
|
||||
extern void kmalloc_init(void);
|
||||
extern void *kmalloc(size_t count, vm_flags_t flags);
|
||||
extern void *kzalloc(size_t count, vm_flags_t flags);
|
||||
extern void kfree(void *p);
|
||||
|
||||
Reference in New Issue
Block a user