mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 09:57:35 +00:00
Kernel: Fix kmalloc memory corruption
Rather than hardcoding where the kmalloc pool should be, place it at the end of the kernel image instead. This avoids corrupting global variables or other parts of the kernel as it grows. Fixes #3257
This commit is contained in:
parent
08a569fbe0
commit
ba6e4fb77f
3 changed files with 40 additions and 10 deletions
|
@ -61,3 +61,6 @@ inline void* operator new[](size_t, void* p) { return p; }
|
|||
#endif
|
||||
return kmalloc_impl(size);
|
||||
}
|
||||
|
||||
extern u8* const kmalloc_start;
|
||||
extern u8* const kmalloc_end;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue