mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:07:45 +00:00
LibIPC: Give MessageBuffer::fds some inline capacity (1)
This dodges a heap allocation when sending 0 or 1 fd across the IPC boundary (which covers every message.)
This commit is contained in:
parent
8608cd11e4
commit
86a3ef2709
2 changed files with 3 additions and 3 deletions
|
@ -6,9 +6,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/NonnullRefPtrVector.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace IPC {
|
||||
|
@ -34,7 +34,7 @@ private:
|
|||
|
||||
struct MessageBuffer {
|
||||
Vector<u8, 1024> data;
|
||||
Vector<RefPtr<AutoCloseFileDescriptor>> fds;
|
||||
NonnullRefPtrVector<AutoCloseFileDescriptor, 1> fds;
|
||||
};
|
||||
|
||||
enum class ErrorCode : u32 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue