~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

Merge initial InnoDB+ import.

This was applied by generating a patch between MySQL 5.1.50 InnoDB plugin and
the just-merged innodb+ from mysql-trunk revision-id: vasil.dimov@oracle.com-20100422110752-1zowoqxel5xx3z2e

Then, some manual merge resolving and it worked. This should make it much
easier to merge the rest of InnoDB 1.1 and 1.2 from the mysql tree using
my bzr-reapply script.

This takes us to InnoDB 1.1.1(ish).

Show diffs side-by-side

added added

removed removed

Lines of Context:
291
291
#endif /* !UNIV_HOTBACKUP */
292
292
 
293
293
/**********************************************************************//**
294
 
Frees a memory block allocated with ut_malloc. */
 
294
Frees a memory block allocated with ut_malloc. Freeing a NULL pointer is
 
295
a nop. */
295
296
UNIV_INTERN
296
297
void
297
298
ut_free(
298
299
/*====*/
299
 
        void* ptr)  /*!< in, own: memory block */
 
300
        void* ptr)  /*!< in, own: memory block, can be NULL */
300
301
{
301
302
#ifndef UNIV_HOTBACKUP
302
303
        ut_mem_block_t* block;
303
304
 
304
 
        if (UNIV_LIKELY(srv_use_sys_malloc)) {
 
305
        if (ptr == NULL) {
 
306
                return;
 
307
        } else if (UNIV_LIKELY(srv_use_sys_malloc)) {
305
308
                free(ptr);
306
309
                return;
307
310
        }