⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intro.so

📁 berkeley db 4.6.21的源码。berkeley db是一个简单的数据库管理系统
💻 SO
字号:
m4_comment([$Id: intro.so,v 10.26 2007/04/05 20:54:56 bostic Exp $])m4_ref_title(Memory Pool Subsystem,    Introduction to the memory pool subsystem,    [introduction to the @memory pool subsystem,    introduction to the memory @cache subsystem,    introduction to the @buffer pool subsystem], log/limits, mp/config)m4_p([dnlThe Memory Pool subsystem is the general-purpose shared memory bufferpool used by m4_db.  This module is useful outside of the m4_db packagefor processes that require page-oriented, shared and cached file access.])m4_p([dnlA m4_italic(memory pool) is a memory cache shared among any number ofthreads of control.  The m4_ref(DB_INIT_MPOOL) flag to them4_refT(dbenv_open) opens and optionally creates a memory pool.  Whenthat pool is no longer in use, it should be closed using them4_refT(dbenv_close).])m4_p([dnlThe m4_refT(memp_fcreate) returns a m4_ref(DbMpoolFile) handle on anunderlying file within the memory pool.  The file may be opened usingthe m4_refT(memp_fopen).  The m4_refT(memp_fget) is used to retrievepages from files in the pool.  All retrieved pages must be subsequentlyreturned using the m4_refT(memp_fput).  At the time pages are returned,they may be marked m4_bold(dirty), which causes them to be written tothe underlying file before being discarded from the pool.  If there isinsufficient room to bring a new page in the pool, a page is selectedto be discarded from the pool using a least-recently-used algorithm.All dirty pages in the pool from the file may be flushed using them4_refT(memp_fsync).  When the file handle is no longer in use, itshould be closed using the m4_refT(memp_fclose).])m4_p([dnlThere are additional configuration interfaces that apply when openinga new file in the memory pool:])m4_bulletbeginm4_bullet([dnlThe m4_refT(memp_set_clear_len) specifies the number of bytes to clearwhen creating a new page in the memory pool.])m4_bullet([dnlThe m4_refT(memp_set_fileid) specifies a unique ID associated with the file.])m4_bullet([dnlThe m4_refT(memp_set_ftype) specifies the type of file for the purposes ofpage input and output processing.])m4_bullet([dnlThe m4_refT(memp_set_lsn_offset) specifies the byte offset of each page'slog sequence number (m4_ref(DbLsn)) for the purposes of transactioncheckpoints.])m4_bullet([dnlThe m4_refT(memp_set_pgcookie) specifies an application provided argumentfor the purposes of page input and output processing.])m4_bulletendm4_p([dnlThere are additional interfaces for the memory pool as a whole:])m4_bulletbeginm4_bullet([dnlIt is possible to gradually flush buffers from the pool in order tomaintain a consistent percentage of clean buffers in the pool usingthe m4_refT(memp_trickle).])m4_bullet([dnlBecause special-purpose processing may be necessary when pages are reador written (for example, endian conversion, or page checksums), them4_ref(memp_register) function allows applications to specify automaticinput and output processing in these cases.])m4_bullet([dnlThe m4_ref(db_stat) utility uses the m4_refT(memp_stat) to displaystatistics about the efficiency of the pool.])m4_bullet([dnlAll dirty pages in the pool may be flushed using the m4_refT(memp_sync).In addition, m4_ref(memp_sync) takes an argument that is specific todatabase systems, and which allows the memory pool to be flushed up toa specified log sequence number (m4_ref(DbLsn)).])m4_bullet([dnlThe entire pool may be discarded using the m4_refT(dbenv_remove).])m4_bulletendinclude(memp/m4.methods)m4_page_footer

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -