pyarrow.MemoryPool¶
- class pyarrow.MemoryPool¶
Bases:
pyarrow.lib._Weakrefable
Base class for memory allocation.
Besides tracking its number of allocated bytes, a memory pool also takes care of the required 64-byte alignment for Arrow data.
- __init__(*args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(*args, **kwargs)Initialize self.
bytes_allocated
(self)Return the number of bytes that are currently allocated from this memory pool.
max_memory
(self)Return the peak memory allocation in this memory pool.
Attributes
The name of the backend used by this MemoryPool (e.g.
- backend_name¶
The name of the backend used by this MemoryPool (e.g. “jemalloc”).
- bytes_allocated(self)¶
Return the number of bytes that are currently allocated from this memory pool.
- max_memory(self)¶
Return the peak memory allocation in this memory pool. This can be an approximate number in multi-threaded applications.
None is returned if the pool implementation doesn’t know how to compute this number.