mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +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
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