~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/mem0pool.h

  • Committer: Brian Aker
  • Date: 2008-09-04 19:31:00 UTC
  • Revision ID: brian@tangent.org-20080904193100-l849hgghfy4urj43
Changing default character set from this point on.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
/************************************************************************
38
38
Creates a memory pool. */
39
 
UNIV_INTERN
 
39
 
40
40
mem_pool_t*
41
41
mem_pool_create(
42
42
/*============*/
45
45
/************************************************************************
46
46
Allocates memory from a pool. NOTE: This low-level function should only be
47
47
used in mem0mem.*! */
48
 
UNIV_INTERN
 
48
 
49
49
void*
50
50
mem_area_alloc(
51
51
/*===========*/
52
52
                                /* out, own: allocated memory buffer */
53
 
        ulint*          psize,  /* in: requested size in bytes; for optimum
 
53
        ulint           size,   /* in: allocated size in bytes; for optimum
54
54
                                space usage, the size should be a power of 2
55
 
                                minus MEM_AREA_EXTRA_SIZE;
56
 
                                out: allocated size in bytes (greater than
57
 
                                or equal to the requested size) */
 
55
                                minus MEM_AREA_EXTRA_SIZE */
58
56
        mem_pool_t*     pool);  /* in: memory pool */
59
57
/************************************************************************
60
58
Frees memory to a pool. */
61
 
UNIV_INTERN
 
59
 
62
60
void
63
61
mem_area_free(
64
62
/*==========*/
67
65
        mem_pool_t*     pool);  /* in: memory pool */
68
66
/************************************************************************
69
67
Returns the amount of reserved memory. */
70
 
UNIV_INTERN
 
68
 
71
69
ulint
72
70
mem_pool_get_reserved(
73
71
/*==================*/
75
73
        mem_pool_t*     pool);  /* in: memory pool */
76
74
/************************************************************************
77
75
Reserves the mem pool mutex. */
78
 
UNIV_INTERN
 
76
 
79
77
void
80
78
mem_pool_mutex_enter(void);
81
79
/*======================*/
82
80
/************************************************************************
83
81
Releases the mem pool mutex. */
84
 
UNIV_INTERN
 
82
 
85
83
void
86
84
mem_pool_mutex_exit(void);
87
85
/*=====================*/
88
86
/************************************************************************
89
87
Validates a memory pool. */
90
 
UNIV_INTERN
 
88
 
91
89
ibool
92
90
mem_pool_validate(
93
91
/*==============*/
95
93
        mem_pool_t*     pool);  /* in: memory pool */
96
94
/************************************************************************
97
95
Prints info of a memory pool. */
98
 
UNIV_INTERN
 
96
 
99
97
void
100
98
mem_pool_print_info(
101
99
/*================*/