Skip to content

Commit

Permalink
[runtime] Rewrite MemoryMappedFile to support named mappings.
Browse files Browse the repository at this point in the history
  • Loading branch information
kumpera committed Jun 26, 2014
1 parent cafd4cd commit f6bdaab
Show file tree
Hide file tree
Showing 10 changed files with 782 additions and 529 deletions.
Expand Up @@ -37,14 +37,17 @@
namespace Microsoft.Win32.SafeHandles
{
public sealed class SafeMemoryMappedViewHandle : SafeBuffer {
internal SafeMemoryMappedViewHandle (IntPtr handle, long size) : base (true) {
this.handle = handle;
IntPtr mmap_handle;

internal SafeMemoryMappedViewHandle (IntPtr mmap_handle, IntPtr base_address, long size) : base (true) {
this.mmap_handle = mmap_handle;
this.handle = base_address;
Initialize ((ulong)size);
}

protected override bool ReleaseHandle () {
if (this.handle != (IntPtr) (-1))
return MemoryMapImpl.Unmap (this.handle, ByteLength);
return MemoryMapImpl.Unmap (this.mmap_handle);
throw new NotImplementedException ();
}
}
Expand Down

0 comments on commit f6bdaab

Please sign in to comment.