~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/mem/mem0mem.c

Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
475
475
        len = block->len;
476
476
        block->magic_n = MEM_FREED_BLOCK_MAGIC_N;
477
477
 
 
478
#ifndef UNIV_HOTBACKUP
478
479
#ifdef UNIV_MEM_DEBUG
479
480
        /* In the debug version we set the memory to a random combination
480
481
        of hex 0xDE and 0xAD. */
484
485
        UNIV_MEM_ASSERT_AND_FREE(block, len);
485
486
#endif /* UNIV_MEM_DEBUG */
486
487
 
487
 
#ifndef UNIV_HOTBACKUP
488
488
        if (type == MEM_HEAP_DYNAMIC || len < UNIV_PAGE_SIZE / 2) {
489
489
 
490
490
                ut_ad(!buf_block);
495
495
                buf_block_free(buf_block);
496
496
        }
497
497
#else /* !UNIV_HOTBACKUP */
 
498
#ifdef UNIV_MEM_DEBUG
 
499
        /* In the debug version we set the memory to a random
 
500
        combination of hex 0xDE and 0xAD. */
 
501
 
 
502
        mem_erase_buf((byte*)block, len);
 
503
#else /* UNIV_MEM_DEBUG */
 
504
        UNIV_MEM_ASSERT_AND_FREE(block, len);
 
505
#endif /* UNIV_MEM_DEBUG */
498
506
        ut_free(block);
499
507
#endif /* !UNIV_HOTBACKUP */
500
508
}