+2010-04-14 Jb Evain <jbevain@novell.com>
+
+ * MemoryMappedViewAccessor.cs
+ * MemoryMappedFile.cs
+ * MemoryMappedViewStream.cs:
+ Properly retrieve the size of the mmapped file. Fixes the
+ unit tests.
+
2009-12-14 Miguel de Icaza <miguel@novell.com>
* MemoryMappedFile.cs: Make this by default use the native
}
}
- internal static unsafe void MapPosix (int file_handle, long offset, long size, MemoryMappedFileAccess access, out IntPtr map_addr, out int offset_diff)
+ internal static unsafe void MapPosix (int file_handle, long offset, ref long size, MemoryMappedFileAccess access, out IntPtr map_addr, out int offset_diff)
{
if (pagesize == 0)
pagesize = Syscall.getpagesize ();
{
int offset_diff;
- MemoryMappedFile.MapPosix (file_handle, offset, size, access, out mmap_addr, out offset_diff);
+ MemoryMappedFile.MapPosix (file_handle, offset, ref size, access, out mmap_addr, out offset_diff);
handle = new SafeMemoryMappedViewHandle ((IntPtr)((long)mmap_addr + offset_diff), size);
Initialize (handle, 0, size, ToFileAccess (access));
{
int offset_diff;
mmap_size = (ulong) size;
- MemoryMappedFile.MapPosix (fd, offset, size, access, out mmap_addr, out offset_diff);
-
+ MemoryMappedFile.MapPosix (fd, offset, ref size, access, out mmap_addr, out offset_diff);
FileAccess faccess;
switch (access) {