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

Kernel: Stop allocating VirtIO configuration structs on the heap

These are trivially-copyable 12-byte structs, so there's no point in
allocating them on the heap.
This commit is contained in:
Idan Horowitz 2022-02-03 16:25:15 +02:00 committed by Andreas Kling
parent be4c144524
commit 2dc91865a4
2 changed files with 12 additions and 12 deletions

View file

@ -227,7 +227,7 @@ private:
virtual bool handle_irq(const RegisterState&) override;
NonnullOwnPtrVector<Queue> m_queues;
NonnullOwnPtrVector<Configuration> m_configs;
Vector<Configuration> m_configs;
const Configuration* m_common_cfg { nullptr }; // Cached due to high usage
const Configuration* m_notify_cfg { nullptr }; // Cached due to high usage
const Configuration* m_isr_cfg { nullptr }; // Cached due to high usage