Example #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();
 }
Example #2
0
        public StreamHeaderRef(MemoryMappedViewAccessor accessor)
        {
            Accessor = accessor;
            Buffer = accessor.GetSafeBuffer();

            byte* temp = null;
            Buffer.AcquirePointer(ref temp);

            Ptr = (StreamHeader*)temp;
        }
Example #3
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);
     }
 }