Lhogho
0.0.028
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Macros
Pages
pools.h
Go to the documentation of this file.
1
//
2
// Project: Lhogho
3
// File: pools.h
4
//
5
// Copyright (C) 2007 P.Boytchev
6
//
7
// Revision history:
8
// 2006-09-29 - Pools module created
9
// 2006-09-30 - Separated free atoms from blocks
10
// 2006-10-10 - More detailed statistics
11
// 2007-02-27 - Module renamed from \b Pool to \b Pools
12
// 2007-05-17 - Added license info
13
// 2007-05-21 - Added doxygen-friendly documentation
14
// 2007-06-05 - Simplified interface
15
// 2007-12-11 - dump_pool()
16
// 2008-01-18 - data_pool_ex
17
//
18
//
19
// This program is free software; you can redistribute it and/or modify
20
// it under the terms of the GNU General Public License as published by
21
// the Free Software Foundation; either version 2 of the License, or
22
// (at your option) any later version.
23
//
24
// This program is distributed in the hope that it will be useful,
25
// but WITHOUT ANY WARRANTY; without even the implied warranty of
26
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
// GNU General Public License for more details.
28
//
29
// You should have received a copy of the GNU General Public License
30
// along with this program; if not, write to the Free Software
31
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32
//
33
34
35
36
//===================================================
39
//===================================================
40
typedef
struct
{
41
int
id
;
42
int
atom_size
;
43
int
block_size
;
44
int
free_block_atoms
;
45
void
*
free_atom
;
46
void
*
free_block
;
47
void
*
first_atom
;
48
}
pool_t
;
49
50
51
extern
pool_t
data_pool
;
52
extern
pool_t
data_pool_ex
;
53
extern
void
init_pool
(
pool_t
* pool,
int
atom_size );
54
extern
void
*
take_from_pool
(
pool_t
* pool );
55
extern
void
return_to_pool
(
pool_t
* pool,
void
* a );
56
57
#ifdef DEBUG_MEMORY_LEAKS
58
extern
void
dump_pool( );
59
#endif
[
HOME
|
INDEX
|
ATOMS
|
VARS
|
REFERENCE
]
Lhogho Developer's Documentation
Wed Jul 10 2013