C++ SDK Documentation  11.0.1
Vertica::VTAllocator Class Referenceabstract

A pool-based allocator that is provided to simplify memory management for UDF implementors. More...

Collaboration diagram for Vertica::VTAllocator:
Collaboration graph

Public Member Functions

virtual void * alloc (size_t size)=0
 
virtual void free (void *ptr, size_t size)
 

Detailed Description

A pool-based allocator that is provided to simplify memory management for UDF implementors.

Member Function Documentation

virtual void* Vertica::VTAllocator::alloc ( size_t  size)
pure virtual

Allocate size_t bytes of memory on a pool. This memory is guaranteed to persist beyond the destroy call but might have been destroyed when the dtor is run or freed explicitly.

virtual void Vertica::VTAllocator::free ( void *  ptr,
size_t  size 
)
inlinevirtual

Free size_t bytes of memory allocated for ptr. Caution: safety is only guaranteed if free() is called on the same VTAllocator object that performed the alloc()