holoscan::MemoryBuffer
Constructors
MemoryBuffer
Default
Overload 2
Move
Copy (deleted)
Destructor
~MemoryBuffer
Assignment operators
operator=
Move assign
Copy assign (deleted)
Methods
set_max_fanout_release_streams
max_fanout_release_streams
free_buffer
resize
Resize the buffer using a native allocator
Overload 2
Resize the buffer using a native allocator.
Returns: Success or the original release/allocation Error. Failed release retains the backing storage and prevents a new allocation. Reporting follows the automatic diagnostic policy and cannot replace the returned failure. Use set_stream() to record later consumer work.
Parameters
Allocator that owns the new backing storage.
Requested size in bytes.
Requested storage location.
Optional CUDA stream for stream-aware allocation and release.
wrap_memory
Wrap externally allocated memory.
Returns: Empty success or Error when existing storage cannot be released or initialized.
Parameters
Backing memory pointer.
Backing memory size in bytes.
Memory storage type.
Optional ownership-release callback.
CUDA ordinal or Allocator::kUnknownDeviceId.
storage_type
pointer
size
device_id
set_stream
Overload 1
Overload 2
stream
stream_state
report_release_failure
Present a release failure through the shared native automatic-report policy.
Parameters
Original failure, borrowed without rendering until presentation is enabled.
Inline resize call site retained for the normal logger.
report_allocation_failure
Present an allocation rejection without changing the allocator’s Error.
Parameters
Original failure, borrowed until this synchronous call returns.
Requested size in bytes.
Requested storage location.
Inline resize call site retained for the normal logger.