mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 23:56:06 +00:00
Kernel: Limit the number of in-flight packet buffers
This fixes an OOM when hitting the VM with lots of UDP packets. fixes #6907
This commit is contained in:
parent
dd39bb7784
commit
f999d5a91a
Notes:
sideshowbarker
2024-07-18 18:36:23 +09:00
Author: https://github.com/gunnarbeutner
Commit: f999d5a91a
Pull-request: https://github.com/SerenityOS/serenity/pull/6914
Issue: https://github.com/SerenityOS/serenity/issues/6907
2 changed files with 11 additions and 0 deletions
|
@ -80,7 +80,11 @@ private:
|
|||
Time timestamp;
|
||||
};
|
||||
|
||||
// FIXME: Make this configurable
|
||||
static constexpr size_t max_packet_buffers = 1024;
|
||||
|
||||
SinglyLinkedList<PacketWithTimestamp> m_packet_queue;
|
||||
size_t m_packet_queue_size { 0 };
|
||||
SinglyLinkedList<KBuffer> m_unused_packet_buffers;
|
||||
size_t m_unused_packet_buffers_count { 0 };
|
||||
String m_name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue