00001 /***************************************************************************** 00002 00003 Copyright (C) 2006, 2009, Innobase Oy. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it under 00006 the terms of the GNU General Public License as published by the Free Software 00007 Foundation; version 2 of the License. 00008 00009 This program is distributed in the hope that it will be useful, but WITHOUT 00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00011 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License along with 00014 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 00015 St, Fifth Floor, Boston, MA 02110-1301 USA 00016 00017 *****************************************************************************/ 00018 00019 /**************************************************/ 00026 #pragma once 00027 #ifndef buf0buddy_h 00028 #define buf0buddy_h 00029 00030 #ifdef UNIV_MATERIALIZE 00031 # undef UNIV_INLINE 00032 # define UNIV_INLINE 00033 #endif 00034 00035 #include "univ.i" 00036 #include "buf0types.h" 00037 00038 /**********************************************************************/ 00048 UNIV_INLINE 00049 void* 00050 buf_buddy_alloc( 00051 /*============*/ 00052 buf_pool_t* buf_pool, 00054 ulint size, 00055 ibool* lru) 00059 __attribute__((malloc)); 00060 00061 /**********************************************************************/ 00063 UNIV_INLINE 00064 void 00065 buf_buddy_free( 00066 /*===========*/ 00067 buf_pool_t* buf_pool, 00069 void* buf, 00071 ulint size) 00072 __attribute__((nonnull)); 00073 00074 #ifndef UNIV_NONINL 00075 # include "buf0buddy.ic" 00076 #endif 00077 00078 #endif /* buf0buddy_h */