Function TRTSERVER_SharedMemoryBlockCpuNew

Function Documentation

TRTSERVER_Error *TRTSERVER_SharedMemoryBlockCpuNew(TRTSERVER_SharedMemoryBlock **shared_memory_block, const char *name, const char *shm_key, const size_t offset, const size_t byte_size)


Object representing a reference to a contiguous block of shared memory. The TRTSERVER_SharedMemoryBlock object does not create or manage the lifetime of the shared-memory block, it simply maintains a reference into the block.Create a new shared memory block object referencing a system shared memory block residing in TRTSERVER_MEMORY_CPU type memory.


a TRTSERVER_Error indicating success or failure.

  • shared_memory_block: Returns the new shared memory block object.

  • name: A unique name for the shared memory block. This name is used in inference requests to refer to this shared memory block.

  • shm_key: The name of the posix shared memory object containing the block of memory.

  • offset: The offset within the system shared memory object to the start of the block.

  • byte_size: The size, in bytes of the block.