~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/ut/ut0mem.c

  • Committer: tdavies
  • Date: 2010-10-02 04:28:26 UTC
  • mto: (1813.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1814.
  • Revision ID: tdavies@molly-20101002042826-n7s0ywccicg7nnk9
In .../drizzled/structs.h: Changed C structs KeyPartInfo, KeyInfo, and RegInfo to C++ classes

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
180
180
 
181
181
                /* Make an intentional seg fault so that we get a stack
182
182
                trace */
 
183
                /* Intentional segfault on NetWare causes an abend. Avoid this
 
184
                by graceful exit handling in ut_a(). */
 
185
#if (!defined __NETWARE__)
183
186
                if (assert_on_error) {
184
187
                        ut_print_timestamp(stderr);
185
188
 
192
195
                } else {
193
196
                        return(NULL);
194
197
                }
 
198
#else
 
199
                ut_a(0);
 
200
#endif
195
201
        }
196
202
 
197
203
        if (set_to_zero) {
285
291
#endif /* !UNIV_HOTBACKUP */
286
292
 
287
293
/**********************************************************************//**
288
 
Frees a memory block allocated with ut_malloc. Freeing a NULL pointer is
289
 
a nop. */
 
294
Frees a memory block allocated with ut_malloc. */
290
295
UNIV_INTERN
291
296
void
292
297
ut_free(
293
298
/*====*/
294
 
        void* ptr)  /*!< in, own: memory block, can be NULL */
 
299
        void* ptr)  /*!< in, own: memory block */
295
300
{
296
301
#ifndef UNIV_HOTBACKUP
297
302
        ut_mem_block_t* block;
298
303
 
299
 
        if (ptr == NULL) {
300
 
                return;
301
 
        } else if (UNIV_LIKELY(srv_use_sys_malloc)) {
 
304
        if (UNIV_LIKELY(srv_use_sys_malloc)) {
302
305
                free(ptr);
303
306
                return;
304
307
        }
431
434
                        " total allocated memory is %lu\n",
432
435
                        (ulong) ut_total_allocated_memory);
433
436
        }
434
 
 
435
 
        ut_mem_block_list_inited = FALSE;
436
437
}
437
438
#endif /* !UNIV_HOTBACKUP */
438
439