code: private void writeMainPage(int userPage, int oidPage, int schemaPage, int indexPage, 
  			int freeSpaceIndexPage, int pageCount, StorageChannelOutput out, long lastUsedOid,
  			long txId) {
  		rootPageID = (rootPageID + 1) % 2;
  		
  		out.seekPageForWrite(PAGE_TYPE.ROOT_PAGE, rootPages[rootPageID]);
  
  		//**********
  		// When updating this, also update checkRoot()!
  		//**********
  		
  		//tx ID
  		out.writeLong(txId);
  		//User table
  		out.writeInt(userPage);
  		//OID table
  		out.writeInt(oidPage);
  		//schemata
  		out.writeInt(schemaPage);
  		//indices
  		out.writeInt(indexPage);
  		//free space index
  		out.writeInt(freeSpaceIndexPage);
  		//page count
  		out.writeInt(pageCount);
  		//last used oid
  		out.writeLong(lastUsedOid);
  		//tx ID. Writing the tx ID twice should ensure that the data between the two has been
  		//written correctly.
  		out.writeLong(txId);
  	}
docs: Writes the main page.
  @param pageCount