mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 00:46:31 +00:00
new: 增加ktest_start函数以开启内核自测试
This commit is contained in:
@ -541,11 +541,13 @@ void *kmalloc(unsigned long size, unsigned long flags)
|
||||
}
|
||||
int index;
|
||||
for (int i = 0; i < 16; ++i)
|
||||
{
|
||||
if (kmalloc_cache_group[i].size >= size)
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
struct slab_obj *slab_obj_ptr = kmalloc_cache_group[index].cache_pool_entry;
|
||||
|
||||
|
Reference in New Issue
Block a user