Page fp = null; if (freeSpacePage < 0) try { fp = getFreePage(); fp.getPageHeader().setStatus(FREE_LIST); freeSpacePage = fp.getPageNum(); fp.write(); } catch (IOException ioe) { LOG.debug(ioe); } else fp = getPage(freeSpacePage); saveFreeSpaceList(fp); super.write(raf);
if(freeList.size() > MAX_FREE_LIST_LEN) { LOG.debug("removing free pages...");  for(int i = 0; i < freeList.size() - MAX_FREE_LIST_LEN; i++) freeList.removeFirst(); } super.write(raf);
		public void write(java.io.RandomAccessFile raf) throws IOException {			Page fp = null;			if (freeSpacePage < 0)				try {					fp = getFreePage();					fp.getPageHeader().setStatus(FREE_LIST);					freeSpacePage = fp.getPageNum();					fp.write();				} catch (IOException ioe) {					LOG.debug(ioe);				} else				fp = getPage(freeSpacePage);			saveFreeSpaceList(fp);			super.write(raf);			raf.writeLong(lastDataPage);			raf.writeLong(freeSpacePage);		}