Пример #1
0
 public override void Sync()
 {
     if (MemoryMapNativeMethods.FlushViewOfFile(PagerState.MapBase, new IntPtr(PagerState.Accessor.Capacity)) == false)
     {
         throw new Win32Exception();
     }
     if (MemoryMapNativeMethods.FlushFileBuffers(_handle) == false)
     {
         throw new Win32Exception();
     }
 }
Пример #2
0
        public override void Sync()
        {
            if (PagerState.AllocationInfos.Any(allocationInfo =>
                                               MemoryMapNativeMethods.FlushViewOfFile(allocationInfo.BaseAddress, new IntPtr(allocationInfo.Size)) == false))
            {
                throw new Win32Exception();
            }

            if (MemoryMapNativeMethods.FlushFileBuffers(_handle) == false)
            {
                throw new Win32Exception();
            }
        }