mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:07:46 +00:00
Kernel: Return ENOMEM in more places
There are plenty of places in the kernel that aren't checking if they actually got their allocation. This fixes some of them, but definitely not all. Fixes #3390 Fixes #3391 Also, let's make find_one_free_page() return nullptr if it doesn't get a free index. This stops the kernel crashing when out of memory and allows memory purging to take place again. Fixes #3487
This commit is contained in:
parent
2229b13c97
commit
68b361bd21
9 changed files with 34 additions and 12 deletions
|
@ -433,9 +433,9 @@ public:
|
|||
void set_default_signal_dispositions();
|
||||
bool push_value_on_stack(FlatPtr);
|
||||
|
||||
u32 make_userspace_stack_for_main_thread(Vector<String> arguments, Vector<String> environment, Vector<AuxiliaryValue>);
|
||||
KResultOr<u32> make_userspace_stack_for_main_thread(Vector<String> arguments, Vector<String> environment, Vector<AuxiliaryValue>);
|
||||
|
||||
void make_thread_specific_region(Badge<Process>);
|
||||
KResult make_thread_specific_region(Badge<Process>);
|
||||
|
||||
unsigned syscall_count() const { return m_syscall_count; }
|
||||
void did_syscall() { ++m_syscall_count; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue