private bool Read(PageCursor cursor, int offset, GSP into) { cursor.Offset = offset; into.Generation = GenerationSafePointer.ReadGeneration(cursor); into.Pointer = GenerationSafePointer.ReadPointer(cursor); return(GenerationSafePointer.VerifyChecksum(cursor, into.Generation, into.Pointer)); }
private static long ReadSlot(PageCursor cursor) { long generation = GenerationSafePointer.ReadGeneration(cursor); long pointer = GenerationSafePointer.ReadPointer(cursor); short checksum = GenerationSafePointer.ReadChecksum(cursor); assertEquals(GenerationSafePointer.ChecksumOf(generation, pointer), checksum); return(pointer); }