new: 增加ktest_start函数以开启内核自测试

This commit is contained in:
fslongjin
2022-07-29 17:40:55 +08:00
parent c1f51bf4cb
commit 7c9366b297
6 changed files with 33 additions and 5 deletions

View File

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