Exemple #1
0
 public CacheEntry(MemoryMappedViewAccessor view, long offset, uint size)
 {
     CreatedWhen = Time.Ticks;
     View        = view;
     Offset      = offset;
     Size        = size;
     IsDisposed  = false;
     _RefCount   = 1;
     Buffer      = view.GetSafeBuffer();
     Pointer     = null;
     Buffer.AcquirePointer(ref Pointer);
     PointerOffset = view.GetPointerOffset();
 }
Exemple #2
0
 public StreamRange(StreamRef stream, MemoryMappedViewAccessor view, long offset, uint size, long actualOffset, long actualSize)
 {
     Stream     = stream;
     View       = view;
     CacheEntry = default(ViewCache.CacheEntry);
     Offset     = offset;
     Size       = size;
     Buffer     = view.GetSafeBuffer();
     Pointer    = null;
     Buffer.AcquirePointer(ref Pointer);
     IsDisposed = false;
     unchecked {
         Pointer += view.GetPointerOffset();
         Pointer += (offset - actualOffset);
     }
 }