1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:27:35 +00:00

Kernel: Avoid allocations for Select vectors by using inline capacity

Good tip by Andreas :)
This commit is contained in:
Robin Burchell 2019-07-19 09:04:12 +02:00 committed by Andreas Kling
parent 52743f9eec
commit 750dbe986d
3 changed files with 13 additions and 11 deletions

View file

@ -143,7 +143,7 @@ bool Thread::SleepBlocker::should_unblock(Thread&, time_t, long)
return m_wakeup_time <= g_uptime;
}
Thread::SelectBlocker::SelectBlocker(const timeval& tv, bool select_has_timeout, const Vector<int>& read_fds, const Vector<int>& write_fds, const Vector<int>& except_fds)
Thread::SelectBlocker::SelectBlocker(const timeval& tv, bool select_has_timeout, const FDVector& read_fds, const FDVector& write_fds, const FDVector& except_fds)
: m_select_timeout(tv)
, m_select_has_timeout(select_has_timeout)
, m_select_read_fds(read_fds)