pyarrow.foreign_buffer#

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

Construct an Arrow buffer with the givenaddress andsize.

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

Parameters:
addressint

The starting address of the buffer. The address canrefer to both device or host memory but it must beaccessible from device after mapping it withget_device_address method.

sizeint

The size of device buffer in bytes.

base{None, object}

Object that owns the referenced memory.