58
59
mem_heap_validate_or_print(
59
60
/*=======================*/
60
mem_heap_t* heap, /* in: memory heap */
61
byte* top, /* in: calculate and validate only until
61
mem_heap_t* heap, /*!< in: memory heap */
62
byte* top, /*!< in: calculate and validate only until
62
63
this top pointer in the heap is reached,
63
64
if this pointer is NULL, ignored */
64
ibool print, /* in: if TRUE, prints the contents
65
ibool print, /*!< in: if TRUE, prints the contents
65
66
of the heap; works only in
66
67
the debug version */
67
ibool* error, /* out: TRUE if error */
68
ulint* us_size,/* out: allocated memory
68
ibool* error, /*!< out: TRUE if error */
69
ulint* us_size,/*!< out: allocated memory
69
70
(for the user) in the heap,
70
71
if a NULL pointer is passed as this
71
72
argument, it is ignored; in the
72
73
non-debug version this is always -1 */
73
ulint* ph_size,/* out: physical size of the heap,
74
if a NULL pointer is passed as this
75
argument, it is ignored */
76
ulint* n_blocks); /* out: number of blocks in the heap,
77
if a NULL pointer is passed as this
78
argument, it is ignored */
79
/******************************************************************
80
Validates the contents of a memory heap. */
74
ulint* ph_size,/*!< out: physical size of the heap,
75
if a NULL pointer is passed as this
76
argument, it is ignored */
77
ulint* n_blocks); /*!< out: number of blocks in the heap,
78
if a NULL pointer is passed as this
79
argument, it is ignored */
80
/**************************************************************//**
81
Validates the contents of a memory heap.
86
mem_heap_t* heap); /* in: memory heap */
87
mem_heap_t* heap); /*!< in: memory heap */
87
88
#endif /* UNIV_MEM_DEBUG || UNIV_DEBUG */
89
/******************************************************************
90
Checks that an object is a memory heap (or a block of it) */
90
/**************************************************************//**
91
Checks that an object is a memory heap (or a block of it)
96
mem_heap_t* heap); /* in: memory heap */
97
mem_heap_t* heap); /*!< in: memory heap */
97
98
#endif /* UNIV_DEBUG */
98
99
#ifdef UNIV_MEM_DEBUG
99
/*********************************************************************
100
TRUE if no memory is currently allocated. */
100
/*****************************************************************//**
101
TRUE if no memory is currently allocated.
102
@return TRUE if no heaps exist */
103
105
mem_all_freed(void);
104
106
/*===============*/
105
/* out: TRUE if no heaps exist */
106
/*********************************************************************
107
Validates the dynamic memory */
107
/*****************************************************************//**
108
Validates the dynamic memory
109
@return TRUE if error */
110
112
mem_validate_no_assert(void);
111
113
/*=========================*/
112
/* out: TRUE if error */
113
/****************************************************************
114
Validates the dynamic memory */
114
/************************************************************//**
115
Validates the dynamic memory
116
@return TRUE if ok */
117
119
mem_validate(void);
118
120
/*===============*/
119
/* out: TRUE if ok */
120
121
#endif /* UNIV_MEM_DEBUG */
121
/****************************************************************
122
/************************************************************//**
122
123
Tries to find neigboring memory allocation blocks and dumps to stderr
123
124
the neighborhood of a given pointer. */
126
127
mem_analyze_corruption(
127
128
/*===================*/
128
void* ptr); /* in: pointer to place of possible corruption */
129
/*********************************************************************
129
void* ptr); /*!< in: pointer to place of possible corruption */
130
/*****************************************************************//**
130
131
Prints information of dynamic memory usage and currently allocated memory
131
132
heaps or buffers. Can only be used in the debug version. */
134
135
mem_print_info(void);
135
136
/*================*/
136
/*********************************************************************
137
/*****************************************************************//**
137
138
Prints information of dynamic memory usage and currently allocated memory
138
139
heaps or buffers since the last ..._print_info or..._print_new_info. */