~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/ut0mem.h

Merge Joe, plus I updated the tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1994, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
11
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
12
 
13
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
 
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
15
Place, Suite 330, Boston, MA 02111-1307 USA
16
16
 
17
17
*****************************************************************************/
18
18
 
96
96
Allocates memory. Sets it also to zero if UNIV_SET_MEM_TO_ZERO is
97
97
defined.
98
98
@return own: allocated memory */
99
 
#ifdef __cplusplus
100
 
extern "C"
101
 
#endif
102
99
UNIV_INTERN
103
100
void*
104
101
ut_malloc(
117
114
        ulint   n);     /*!< in: try to allocate this many bytes */
118
115
#endif /* !UNIV_HOTBACKUP */
119
116
/**********************************************************************//**
120
 
Frees a memory block allocated with ut_malloc. Freeing a NULL pointer is
121
 
a nop. */
122
 
#ifdef __cplusplus
123
 
extern "C"
124
 
#endif
 
117
Frees a memory block allocated with ut_malloc. */
125
118
UNIV_INTERN
126
119
void
127
120
ut_free(
128
121
/*====*/
129
 
        void* ptr);  /*!< in, own: memory block, can be NULL */
 
122
        void* ptr);  /*!< in, own: memory block */
130
123
#ifndef UNIV_HOTBACKUP
131
124
/**********************************************************************//**
132
125
Implements realloc. This is needed by /pars/lexyy.c. Otherwise, you should not
153
146
       original  block  is  left  untouched  - it is not freed or
154
147
       moved.
155
148
@return own: pointer to new mem block or NULL */
156
 
#ifdef __cplusplus
157
 
extern "C"
158
 
#endif
159
149
UNIV_INTERN
160
150
void*
161
151
ut_realloc(