pyarrow.foreign_buffer#

pyarrow.foreign_buffer(address, size, base=None)#

Construct an Arrow buffer with the given address and size.

The buffer will be optionally backed by the Python base object, if given. The base object will be kept alive as long as this buffer is alive, including across language boundaries (for example if the buffer is referenced by C++ code).

Parameters:
addressint

The starting address of the buffer. The address can refer to both device or host memory but it must be accessible from device after mapping it with get_device_address method.

sizeint

The size of device buffer in bytes.

base{None, object}

Object that owns the referenced memory.