mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
d8aa953d08
* Remove old Innobase copyright lines from C source files * Add a reference to the GPLv2 license as recommended by the lawyers at Oracle Legal [Step 5/28]
70 lines
2.3 KiB
C
70 lines
2.3 KiB
C
/*****************************************************************************
|
|
|
|
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
|
|
|
|
This program is free software; you can redistribute it and/or modify it under
|
|
the terms of the GNU General Public License as published by the Free Software
|
|
Foundation; version 2 of the License.
|
|
|
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
|
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
|
Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*****************************************************************************/
|
|
|
|
/******************************************************
|
|
The database buffer pool global types for the directory
|
|
|
|
Created 11/17/1995 Heikki Tuuri
|
|
*******************************************************/
|
|
|
|
#ifndef buf0types_h
|
|
#define buf0types_h
|
|
|
|
typedef struct buf_page_struct buf_page_t;
|
|
typedef struct buf_block_struct buf_block_t;
|
|
typedef struct buf_chunk_struct buf_chunk_t;
|
|
typedef struct buf_pool_struct buf_pool_t;
|
|
|
|
/* The 'type' used of a buffer frame */
|
|
typedef byte buf_frame_t;
|
|
|
|
/* Flags for flush types */
|
|
enum buf_flush {
|
|
BUF_FLUSH_LRU = 0,
|
|
BUF_FLUSH_SINGLE_PAGE,
|
|
BUF_FLUSH_LIST,
|
|
BUF_FLUSH_N_TYPES /* index of last element + 1 */
|
|
};
|
|
|
|
/* Flags for io_fix types */
|
|
enum buf_io_fix {
|
|
BUF_IO_NONE = 0, /**< no pending I/O */
|
|
BUF_IO_READ, /**< read pending */
|
|
BUF_IO_WRITE /**< write pending */
|
|
};
|
|
|
|
/* Parameters of binary buddy system for compressed pages (buf0buddy.h) */
|
|
#if UNIV_WORD_SIZE <= 4 /* 32-bit system */
|
|
# define BUF_BUDDY_LOW_SHIFT 6
|
|
#else /* 64-bit system */
|
|
# define BUF_BUDDY_LOW_SHIFT 7
|
|
#endif
|
|
#define BUF_BUDDY_LOW (1 << BUF_BUDDY_LOW_SHIFT)
|
|
/* minimum block size in the binary
|
|
buddy system; must be at least
|
|
sizeof(buf_page_t) */
|
|
#define BUF_BUDDY_SIZES (UNIV_PAGE_SIZE_SHIFT - BUF_BUDDY_LOW_SHIFT)
|
|
/* number of buddy sizes */
|
|
|
|
/* twice the maximum block size of the buddy system;
|
|
the underlying memory is aligned by this amount:
|
|
this must be equal to UNIV_PAGE_SIZE */
|
|
#define BUF_BUDDY_HIGH (BUF_BUDDY_LOW << BUF_BUDDY_SIZES)
|
|
|
|
#endif
|
|
|