MySQL 8.4.0
Source Code Documentation
Binlog_iterator_ctx::Passthrough_allocator Class Reference

This is a passthrough allocator. More...

Public Types

enum  { DELEGATE_MEMORY_TO_EVENT_OBJECT = false }
 Do not delegate the memory to the event as that may have the event deallocate it at the destructor. More...
 

Public Member Functions

unsigned char * allocate (size_t size)
 
void deallocate (unsigned char *ptr)
 
void set_context (Binlog_iterator_ctx *ctx)
 

Private Attributes

Binlog_iterator_ctxm_ctx {nullptr}
 

Detailed Description

This is a passthrough allocator.

This allocator returns the buffer referenced in the context always. If the reader requests more memory to be allocated and the memory requested exceeds the capacity of the buffer in use, the allocator will return nullptr, meaning that the buffer is insufficient to store the next event. This causes the reader to fail with MEM_ALLOCATE error.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Do not delegate the memory to the event as that may have the event deallocate it at the destructor.

We do not want that.

Enumerator
DELEGATE_MEMORY_TO_EVENT_OBJECT 

Member Function Documentation

◆ allocate()

unsigned char * Binlog_iterator_ctx::Passthrough_allocator::allocate ( size_t  size)
inline

◆ deallocate()

void Binlog_iterator_ctx::Passthrough_allocator::deallocate ( unsigned char *  ptr)
inline

◆ set_context()

void Binlog_iterator_ctx::Passthrough_allocator::set_context ( Binlog_iterator_ctx ctx)
inline

Member Data Documentation

◆ m_ctx

Binlog_iterator_ctx* Binlog_iterator_ctx::Passthrough_allocator::m_ctx {nullptr}
private

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