Buffers and Memory

In-Memory Buffers

Factory Functions

allocate_buffer(int64_t size, …[, resizable])

Allocate a mutable buffer.

py_buffer(obj)

Construct an Arrow buffer from a Python bytes-like or buffer-like object

foreign_buffer(address, size[, base])

Construct an Arrow buffer with the given address and size.

Classes

Buffer()

The base class for all Arrow buffers.

ResizableBuffer

A base class for buffers that can be resized.

Miscellaneous

compress(buf[, codec, asbytes, memory_pool])

Compress data from buffer-like object.

decompress(buf[, decompressed_size, codec, …])

Decompress data from buffer-like object.

Memory Pools

MemoryPool()

Base class for memory allocation.

default_memory_pool()

Return the process-global memory pool.

total_allocated_bytes()

Return the currently allocated bytes from the default memory pool.

set_memory_pool(MemoryPool pool)

log_memory_allocations([enable])

Enable or disable memory allocator logging for debugging purposes