示例#1
0
 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));
 }
示例#2
0
        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);
        }