ladybird/Libraries/LibIPC/CMakeLists.txt
Aliaksandr Kalenik 60f27523c6 LibIPC: Adopt Mach OOL payloads on receive
Mach transport already sends payloads as out-of-line virtual-copy
regions, but the receive path immediately copied each payload into a new
Vector and deallocated the kernel mapping. That made the IPC IO thread
touch every byte before the main thread could decode the message.

Add ReceivedMessageBytes as the raw-message byte storage and let the
Mach transport adopt the OOL region directly. The mapping now lives
until the raw message storage is destroyed, so invalid descriptor paths
and normal queue teardown both release it through the same destructor.
Socket transports keep their existing receive copy path by wrapping
vectors in the same storage type, and the direct raw-message consumers
now decode from its ReadonlyBytes view.
2026-06-13 00:27:57 +01:00

29 lines
646 B
CMake

set(SOURCES
AutoCloseFileDescriptor.cpp
Connection.cpp
Decoder.cpp
Encoder.cpp
File.cpp
Message.cpp
ReceivedMessageBytes.cpp
TransportHandle.cpp
)
if (APPLE AND NOT IOS)
list(APPEND SOURCES
AttachmentMachPort.cpp
MachBootstrapListener.cpp
TransportBootstrapMach.cpp
TransportMachPort.cpp)
elseif (UNIX)
list(APPEND SOURCES
Attachment.cpp
TransportSocket.cpp)
else()
list(APPEND SOURCES
Attachment.cpp
TransportSocketWindows.cpp)
endif()
ladybird_lib(LibIPC ipc)
target_link_libraries(LibIPC PRIVATE LibCore LibSync LibThreading LibURL)