kmalloc: add consistency test when KDEBUG is defined
This commit is contained in:
parent
4e36cfd90b
commit
c712f0a7d6
3 changed files with 43 additions and 6 deletions
|
|
@ -225,11 +225,7 @@ void slabtypes_init()
|
|||
kmalloc_init();
|
||||
}
|
||||
|
||||
void malloc_post()
|
||||
bool kmalloc_verify()
|
||||
{
|
||||
bool verify = rbt_verify(&kmalloc_tree);
|
||||
if(!verify)
|
||||
printf(LOG_ERROR, "kmalloc tree is corrupted!\n");
|
||||
else
|
||||
printf(LOG_SUCCESS "kmalloc tree is OK!\n");
|
||||
return rbt_verify(&kmalloc_tree);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue