public void Flush(IntPtr viewBaseAddr) { // Throws OverflowException if (a) this is a 32-bit platform AND (b) size is out of bounds (ie. int bounds) with respect to this platform IntPtr flushLength = new IntPtr(MaxSize); Win32MapApis.FlushViewOfFile(viewBaseAddr, flushLength); }
public override void Flush() { if (!IsOpen) throw new ObjectDisposedException("Stream is closed"); // flush the view but leave the buffer intact // FIX: get rid of cast Win32MapApis.FlushViewOfFile(_base, (int)_length); }