src/server/PageInfo.cxx

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by www.databasecache.com                           *
00003  *   Contact: praba_tuty@databasecache.com                                 *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015   ***************************************************************************/
00016 #include<Allocator.h>
00017 #include<os.h>
00018 #include<Config.h>
00019 
00020 void PageInfo::setPageAsUsed(size_t offset)
00021 {
00022     isUsed_ = 1;
00023     hasFreeSpace_ = 1;
00024     nextPage_ = NULL;
00025     if (PAGE_SIZE > offset)
00026         nextPageAfterMerge_ = NULL;
00027     else
00028         nextPageAfterMerge_ = ((char*)this)+ offset;
00029 }
00030 void PageInfo::setFirstPageAsUsed()
00031 {
00032     isUsed_ = 1;
00033     hasFreeSpace_ = 1;
00034     nextPageAfterMerge_ = NULL;
00035     nextPage_ = NULL;
00036 }

Generated on Mon Jun 9 22:37:15 2008 for csql by  doxygen 1.4.7