AllocatePage() private method

private AllocatePage ( int numberOfPages, PageFlags flags, long pageNumber = null ) : Voron.Trees.Page
numberOfPages int
flags PageFlags
pageNumber long
return Voron.Trees.Page
Esempio n. 1
0
		internal static Page NewPage(Transaction tx, PageFlags flags, int num)
		{
			var page = tx.AllocatePage(num);
			page.Flags = flags;

			return page;
		}
Esempio n. 2
0
		private long WriteToOverflowPages(Transaction tx, TreeMutableState txInfo, int overflowSize, out byte* dataPos)
		{
			var numberOfPages = tx.DataPager.GetNumberOfOverflowPages(overflowSize);
			var overflowPageStart = tx.AllocatePage(numberOfPages);
			overflowPageStart.Flags = PageFlags.Overflow;
			overflowPageStart.OverflowSize = overflowSize;
			dataPos = overflowPageStart.Base + Constants.PageHeaderSize;
			txInfo.OverflowPages += numberOfPages;
			txInfo.PageCount += numberOfPages;
			return overflowPageStart.PageNumber;
		}