Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mem0pool.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (C) 1994, 2009, Innobase Oy. All Rights Reserved.
4
5
This program is free software; you can redistribute it and/or modify it under
6
the terms of the GNU General Public License as published by the Free Software
7
Foundation; version 2 of the License.
8
9
This program is distributed in the hope that it will be useful, but WITHOUT
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License along with
14
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15
St, Fifth Floor, Boston, MA 02110-1301 USA
16
17
*****************************************************************************/
18
19
/**************************************************/
26
#pragma once
27
#ifndef mem0pool_h
28
#define mem0pool_h
29
30
#include "univ.i"
31
#include "
os0file.h
"
32
#include "
ut0lst.h
"
33
35
typedef
struct
mem_area_struct
mem_area_t
;
37
typedef
struct
mem_pool_struct
mem_pool_t
;
38
40
extern
mem_pool_t
*
mem_comm_pool
;
41
44
struct
mem_area_struct
{
45
ulint
size_and_free
;
49
UT_LIST_NODE_T
(
mem_area_t
)
50
free_list
;
51
};
52
54
#define MEM_AREA_EXTRA_SIZE (ut_calc_align(sizeof(struct mem_area_struct),\
55
UNIV_MEM_ALIGNMENT))
56
57
/********************************************************************/
60
UNIV_INTERN
61
mem_pool_t
*
62
mem_pool_create
(
63
/*============*/
64
ulint size);
65
/********************************************************************/
67
UNIV_INTERN
68
void
69
mem_pool_free
(
70
/*==========*/
71
mem_pool_t
* pool);
72
/********************************************************************/
76
UNIV_INTERN
77
void
*
78
mem_area_alloc
(
79
/*===========*/
80
ulint* psize,
85
mem_pool_t
* pool);
86
/********************************************************************/
88
UNIV_INTERN
89
void
90
mem_area_free
(
91
/*==========*/
92
void
* ptr,
94
mem_pool_t
* pool);
95
/********************************************************************/
98
UNIV_INTERN
99
ulint
100
mem_pool_get_reserved
(
101
/*==================*/
102
mem_pool_t
* pool);
103
/********************************************************************/
106
UNIV_INTERN
107
ibool
108
mem_pool_validate
(
109
/*==============*/
110
mem_pool_t
* pool);
111
/********************************************************************/
113
UNIV_INTERN
114
void
115
mem_pool_print_info
(
116
/*================*/
117
FILE* outfile,
118
mem_pool_t
* pool);
121
#ifndef UNIV_NONINL
122
#include "mem0pool.ic"
123
#endif
124
125
#endif
plugin
innobase
include
mem0pool.h
Generated on Tue Oct 29 2013 17:05:46 for drizzle by
1.8.4