|
VLink
2.3.0
A high-performance communication middleware
|
Holds a local memory address and an owned provider reference. 更多...
#include <fast_buffer.h>
Holds a local memory address and an owned provider reference.
Construction initializes FastBufferManager; operations obtain its provider without storing a plugin pointer. Release buffers before manager shutdown. Copy construction and assignment deep-copy through the provider; shallow_copy explicitly retains the same allocation without payload copying. A retained reference survives its source object. Moving transfers the reference and leaves the source empty.
The wire format is [magic (4), version (4), fixed header (88), metadata (M), payload (N), end magic (4)] in the same native byte order as other zero-copy containers. Shared payloads name a control block, not local addresses. Host payloads contain actual bytes and are copied into provider storage on deserialization. Local C++ object memory, plugin references and device indices are never serialized.
Releasing the last local reference of an exported allocation never waits for importers. Sharing lifetime follows vlink::FastBufferPluginInterface.