Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
Public Member Functions | List of all members
arrow::LoggingMemoryPool Class Reference

#include <arrow/memory_pool.h>

Inheritance diagram for arrow::LoggingMemoryPool:
arrow::MemoryPool

Public Member Functions

 LoggingMemoryPool (MemoryPool *pool)
 
virtual ~LoggingMemoryPool ()=default
 
Status Allocate (int64_t size, uint8_t **out) override
 Allocate a new memory region of at least size bytes. More...
 
Status Reallocate (int64_t old_size, int64_t new_size, uint8_t **ptr) override
 Resize an already allocated memory section. More...
 
void Free (uint8_t *buffer, int64_t size) override
 Free an allocated region. More...
 
int64_t bytes_allocated () const override
 The number of bytes that were allocated and not yet free'd through this allocator. More...
 
int64_t max_memory () const override
 Return peak memory allocation in this memory pool. More...
 
- Public Member Functions inherited from arrow::MemoryPool
virtual ~MemoryPool ()
 

Additional Inherited Members

- Protected Member Functions inherited from arrow::MemoryPool
 MemoryPool ()
 

Constructor & Destructor Documentation

◆ LoggingMemoryPool()

arrow::LoggingMemoryPool::LoggingMemoryPool ( MemoryPool pool)
explicit

◆ ~LoggingMemoryPool()

virtual arrow::LoggingMemoryPool::~LoggingMemoryPool ( )
virtualdefault

Member Function Documentation

◆ Allocate()

Status arrow::LoggingMemoryPool::Allocate ( int64_t  size,
uint8_t **  out 
)
overridevirtual

Allocate a new memory region of at least size bytes.

The allocated region shall be 64-byte aligned.

Implements arrow::MemoryPool.

◆ bytes_allocated()

int64_t arrow::LoggingMemoryPool::bytes_allocated ( ) const
overridevirtual

The number of bytes that were allocated and not yet free'd through this allocator.

Implements arrow::MemoryPool.

◆ Free()

void arrow::LoggingMemoryPool::Free ( uint8_t *  buffer,
int64_t  size 
)
overridevirtual

Free an allocated region.

Parameters
bufferPointer to the start of the allocated memory region
sizeAllocated size located at buffer. An allocator implementation may use this for tracking the amount of allocated bytes as well as for faster deallocation if supported by its backend.

Implements arrow::MemoryPool.

◆ max_memory()

int64_t arrow::LoggingMemoryPool::max_memory ( ) const
overridevirtual

Return peak memory allocation in this memory pool.

Returns
Maximum bytes allocated. If not known (or not implemented), returns -1

Reimplemented from arrow::MemoryPool.

◆ Reallocate()

Status arrow::LoggingMemoryPool::Reallocate ( int64_t  old_size,
int64_t  new_size,
uint8_t **  ptr 
)
overridevirtual

Resize an already allocated memory section.

As by default most default allocators on a platform don't support aligned reallocation, this function can involve a copy of the underlying data.

Implements arrow::MemoryPool.


The documentation for this class was generated from the following file: