MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Dbtup::Disk_alloc_info Struct Reference
Collaboration diagram for Dbtup::Disk_alloc_info:

Public Member Functions

 Disk_alloc_info (const Tablerec *tabPtrP, Uint32 extent_size_in_pages)
 STATIC_CONST (SZ=EXTENT_SEARCH_MATRIX_SIZE)
Uint32 find_extent (Uint32 sz) const
Uint32 calc_extent_pos (const Extent_info *) const
Uint32 calc_page_free_space (Uint32 bits) const
Uint32 calc_page_free_bits (Uint32 free) const

Public Attributes

Uint32 m_extent_size
DLList< Page >::Head m_dirty_pages [MAX_FREE_LIST]
Page_request_list::Head m_page_requests [MAX_FREE_LIST]
DLList< Page >::Head m_unmap_pages
Uint32 m_curr_extent_info_ptr_i
Extent_info_list::Head m_free_extents [SZ]
Uint32 m_total_extent_free_space_thresholds [EXTENT_SEARCH_MATRIX_ROWS]
Uint32 m_page_free_bits_map [EXTENT_SEARCH_MATRIX_COLS]
Fragment_extent_list::Head m_extent_list

Detailed Description

Definition at line 644 of file Dbtup.hpp.

Member Function Documentation

Uint32 Dbtup::Disk_alloc_info::calc_extent_pos ( const Extent_info extP) const

Find correct row based on total free space if zero (or very small free space) put absolutly last

Find correct col based on largest available chunk

NOTE

If free space on extent is small or zero, col will be = EXTENT_SEARCH_MATRIX_COLS row will be = EXTENT_SEARCH_MATRIX_ROWS in that case pos will be col * row = max pos (as fixed by + 1 in declaration)

Definition at line 223 of file DbtupDiskAlloc.cpp.

Uint32 Dbtup::Disk_alloc_info::calc_page_free_bits ( Uint32  free) const
inline

Compute page free bits, given free space

Definition at line 706 of file Dbtup.hpp.

Here is the caller graph for this function:

Uint32 Dbtup::Disk_alloc_info::calc_page_free_space ( Uint32  bits) const
inline

Compute minimum free space on page given bits

Definition at line 699 of file Dbtup.hpp.

Uint32 Dbtup::Disk_alloc_info::find_extent ( Uint32  sz) const

Find an extent with sufficient space for sz Find the biggest available (with most free space) Return position in matrix

Definition at line 196 of file DbtupDiskAlloc.cpp.

Member Data Documentation

Uint32 Dbtup::Disk_alloc_info::m_curr_extent_info_ptr_i

Current extent

Definition at line 683 of file Dbtup.hpp.

DLList<Page>::Head Dbtup::Disk_alloc_info::m_dirty_pages[MAX_FREE_LIST]

Disk allocation

1) Allocate space on pages that already are dirty (4 free lists for different requests) 2) Allocate space on pages waiting to maped that will be dirty (4 free lists for different requests) 3) Check if "current" extent can accommodate request If so, allocate page from there Else put "current" into free matrix 4) Search free matrix for extent with greatest amount of free space while still accommodating current request (20 free lists for different requests) Free list of pages in different size that are dirty

Definition at line 670 of file Dbtup.hpp.

Page_request_list::Head Dbtup::Disk_alloc_info::m_page_requests[MAX_FREE_LIST]

Requests (for update) that have sufficient space left after request these are currently being "mapped"

Definition at line 676 of file Dbtup.hpp.


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