InnoDB Plugin  1.0
Data Structures | Macros | Functions | Variables
mem0pool.h File Reference
#include "univ.i"
#include "os0file.h"
#include "ut0lst.h"
#include "mem0pool.ic"
Include dependency graph for mem0pool.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mem_area_t




UNIV_INTERN mem_pool_t * mem_pool_create (ulint size)
UNIV_INTERN void mem_pool_free (mem_pool_t *pool)
UNIV_INTERN void * mem_area_alloc (ulint *psize, mem_pool_t *pool)
UNIV_INTERN void mem_area_free (void *ptr, mem_pool_t *pool)
UNIV_INTERN ulint mem_pool_get_reserved (mem_pool_t *pool)
UNIV_INTERN ibool mem_pool_validate (mem_pool_t *pool)
UNIV_INTERN void mem_pool_print_info (FILE *outfile, mem_pool_t *pool)


mem_pool_t * mem_comm_pool

Detailed Description

The lowest-level memory management

Created 6/9/1994 Heikki Tuuri

Macro Definition Documentation


Each memory area takes this many extra bytes for control information

Function Documentation

UNIV_INTERN void* mem_area_alloc ( ulint *  psize,
mem_pool_t *  pool 

Allocates memory from a pool. NOTE: This low-level function should only be used in mem0mem.*!

own: allocated memory buffer in: memory pool
psizein: requested size in bytes; for optimum space usage, the size should be a power of 2 minus MEM_AREA_EXTRA_SIZE; out: allocated size in bytes (greater than or equal to the requested size)
UNIV_INTERN void mem_area_free ( void *  ptr,
mem_pool_t *  pool 

Frees memory to a pool. in: memory pool

ptrin, own: pointer to allocated memory buffer
UNIV_INTERN mem_pool_t* mem_pool_create ( ulint  size)

Creates a memory pool.

memory pool in: pool size in bytes
UNIV_INTERN void mem_pool_free ( mem_pool_t *  pool)

Frees a memory pool. in, own: memory pool

UNIV_INTERN ulint mem_pool_get_reserved ( mem_pool_t *  pool)

Returns the amount of reserved memory.

reserved mmeory in bytes in: memory pool
UNIV_INTERN void mem_pool_print_info ( FILE *  outfile,
mem_pool_t *  pool 

Prints info of a memory pool. in: memory pool

outfilein: output file to write to
UNIV_INTERN ibool mem_pool_validate ( mem_pool_t *  pool)

Validates a memory pool.

TRUE if ok in: memory pool

Variable Documentation

mem_pool_t* mem_comm_pool

The common memory pool