MySQL 8.0.39
Source Code Documentation
buf_chunk_t Struct Reference

A chunk of buffers. More...

Public Member Functions

size_t mem_size () const
 Get the size of 'mem' in bytes. More...
 
bool madvise_dump ()
 Advices the OS that this chunk should not be dumped to a core file. More...
 
bool madvise_dont_dump ()
 Advices the OS that this chunk should be dumped to a core file. More...
 
bool contains (const buf_block_t *ptr) const
 Checks if this chunk contains a given block without dereferencing it. More...
 

Public Attributes

ulint size
 size of frames[] and blocks[] More...
 
unsigned char * mem
 pointer to the memory area which was allocated for the frames More...
 
buf_block_tblocks
 array of buffer control blocks More...
 

Detailed Description

A chunk of buffers.

The buffer pool is allocated in chunks.

Member Function Documentation

◆ contains()

bool buf_chunk_t::contains ( const buf_block_t ptr) const
inline

Checks if this chunk contains a given block without dereferencing it.

Parameters
[in]ptrA pointer which we want to check
Returns
true iff the ptr points inside the chunk

◆ madvise_dont_dump()

bool buf_chunk_t::madvise_dont_dump ( )

Advices the OS that this chunk should be dumped to a core file.

Emits a warning to the log if could not succeed.

Returns
true iff succeeded, false if no OS support or failed

◆ madvise_dump()

bool buf_chunk_t::madvise_dump ( )

Advices the OS that this chunk should not be dumped to a core file.

Emits a warning to the log if could not succeed.

Returns
true iff succeeded, false if no OS support or failed

◆ mem_size()

size_t buf_chunk_t::mem_size ( ) const
inline

Get the size of 'mem' in bytes.

Member Data Documentation

◆ blocks

buf_block_t* buf_chunk_t::blocks

array of buffer control blocks

◆ mem

unsigned char* buf_chunk_t::mem

pointer to the memory area which was allocated for the frames

◆ size

ulint buf_chunk_t::size

size of frames[] and blocks[]


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