private void abortPageFault( Throwable throwable, int[] chunk, long chunkOffset, LatchMap.Latch latch, PageFaultEvent faultEvent ) { UnsafeUtil.putIntVolatile( chunk, chunkOffset, UNMAPPED_TTE ); latch.release(); faultEvent.done( throwable ); pinEvent.done(); }
/** * Remove the mapping of the given filePageId from the translation table, and return the evicted page object. * @param filePageId The id of the file page to evict. */ private void evictPage( long filePageId ) { int chunkId = computeChunkId( filePageId ); long chunkOffset = computeChunkOffset( filePageId ); int[] chunk = translationTable[chunkId]; int mappedPageId = UnsafeUtil.getIntVolatile( chunk, chunkOffset ); long pageRef = deref( mappedPageId ); setHighestEvictedTransactionId( getAndResetLastModifiedTransactionId( pageRef ) ); UnsafeUtil.putIntVolatile( chunk, chunkOffset, UNMAPPED_TTE ); }
obj.anInt = 0; assertThat( obj, is( new Obj() ) ); putIntVolatile( obj, anIntOffset, 2 ); assertThat( obj.anInt, is( 2 ) ); assertThat( getIntVolatile( obj, anIntOffset ), is( 2 ) );
assertThat( getInt( address ), is( 0 ) ); putIntVolatile( address, 1 ); assertThat( getIntVolatile( address ), is( 1 ) ); setMemory( address, sizeInBytes, (byte) 0 );
UnsafeUtil.putIntVolatile( chunk, chunkOffset, pagedFile.toId( pageRef ) );
private void abortPageFault( Throwable throwable, int[] chunk, long chunkOffset, LatchMap.Latch latch, PageFaultEvent faultEvent ) { UnsafeUtil.putIntVolatile( chunk, chunkOffset, UNMAPPED_TTE ); latch.release(); faultEvent.done( throwable ); pinEvent.done(); }
/** * Remove the mapping of the given filePageId from the translation table, and return the evicted page object. * @param filePageId The id of the file page to evict. */ private void evictPage( long filePageId ) { int chunkId = computeChunkId( filePageId ); long chunkOffset = computeChunkOffset( filePageId ); int[] chunk = translationTable[chunkId]; int mappedPageId = UnsafeUtil.getIntVolatile( chunk, chunkOffset ); long pageRef = deref( mappedPageId ); setHighestEvictedTransactionId( getAndResetLastModifiedTransactionId( pageRef ) ); UnsafeUtil.putIntVolatile( chunk, chunkOffset, UNMAPPED_TTE ); }
UnsafeUtil.putIntVolatile( chunk, chunkOffset, pagedFile.toId( pageRef ) );