mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-08 12:56:23 +03:00
Kernel: Log purported size of bogus kfree_sized() requests
This commit is contained in:
parent
c6c786c992
commit
9182653a0f
Notes:
sideshowbarker
2024-07-17 22:10:03 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9182653a0fa
@ -79,7 +79,7 @@ struct KmallocGlobalData {
|
||||
return allocate(size);
|
||||
}
|
||||
|
||||
void deallocate(void* ptr)
|
||||
void deallocate(void* ptr, size_t size)
|
||||
{
|
||||
VERIFY(!expansion_in_progress);
|
||||
|
||||
@ -90,7 +90,7 @@ struct KmallocGlobalData {
|
||||
}
|
||||
}
|
||||
|
||||
PANIC("Bogus pointer {:p} passed to kfree()", ptr);
|
||||
PANIC("Bogus pointer passed to kfree_sized({:p}, {})", ptr, size);
|
||||
}
|
||||
|
||||
size_t allocated_bytes() const
|
||||
@ -292,7 +292,7 @@ void kfree_sized(void* ptr, size_t size)
|
||||
PerformanceManager::add_kfree_perf_event(*current_thread, 0, (FlatPtr)ptr);
|
||||
}
|
||||
|
||||
g_kmalloc_global->deallocate(ptr);
|
||||
g_kmalloc_global->deallocate(ptr, size);
|
||||
--g_nested_kfree_calls;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user