~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/buf/buf0buddy.c

Merge Monty - Updates to pandora-build to support features of gcc 4.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
                buf_buddy_remove_from_free(buf_pool, bpage, i);
147
147
        } else if (i + 1 < BUF_BUDDY_SIZES) {
148
148
                /* Attempt to split. */
149
 
                bpage = buf_buddy_alloc_zip(buf_pool, i + 1);
 
149
                bpage = (buf_page_t *)buf_buddy_alloc_zip(buf_pool, i + 1);
150
150
 
151
151
                if (bpage) {
152
152
                        buf_page_t*     buddy = (buf_page_t*)
305
305
 
306
306
        if (i < BUF_BUDDY_SIZES) {
307
307
                /* Try to allocate from the buddy system. */
308
 
                block = buf_buddy_alloc_zip(buf_pool, i);
 
308
                block = (buf_block_t *)buf_buddy_alloc_zip(buf_pool, i);
309
309
 
310
310
                if (block) {
311
311
                        goto func_exit;
334
334
alloc_big:
335
335
        buf_buddy_block_register(block);
336
336
 
337
 
        block = buf_buddy_alloc_from(
338
 
                buf_pool, block->frame, i, BUF_BUDDY_SIZES);
 
337
        block = (buf_block_t *)buf_buddy_alloc_from(buf_pool, block->frame,
 
338
                                                    i, BUF_BUDDY_SIZES);
339
339
 
340
340
func_exit:
341
341
        buf_pool->buddy_stat[i].used++;
490
490
                        /* Relocate the compressed page. */
491
491
                        ut_a(bpage->zip.data == src);
492
492
                        memcpy(dst, src, size);
493
 
                        bpage->zip.data = dst;
 
493
                        bpage->zip.data = (page_zip_t *)dst;
494
494
                        mutex_exit(mutex);
495
495
success:
496
496
                        UNIV_MEM_INVALID(src, size);
513
513
                about uninitialized pad bytes. */
514
514
                UNIV_MEM_ASSERT_RW(src, size);
515
515
#endif
516
 
                if (buf_buddy_relocate_block(src, dst)) {
 
516
                if (buf_buddy_relocate_block((buf_page_t *)src, (buf_page_t *)dst)) {
517
517
 
518
518
                        goto success;
519
519
                }
655
655
        }
656
656
 
657
657
        /* Free the block to the buddy list. */
658
 
        bpage = buf;
 
658
        bpage = (buf_page_t *)buf;
659
659
#ifdef UNIV_DEBUG
660
660
        if (i < buf_buddy_get_slot(PAGE_ZIP_MIN_SIZE)) {
661
661
                /* This area has most likely been allocated for at