private void Dispose(bool disposing) { if (Start != UIntPtr.Zero) { #if !MONO Kernel32.VirtualFree(Start, UIntPtr.Zero, Kernel32.FreeType.RELEASE); #else LibC.munmap(Start, (UIntPtr)Size); #endif Start = UIntPtr.Zero; } }
public void finalize() { if (mapInterrupts != LibC.MAP_FAILED) { LibC.munmap(mapInterrupts, (UIntPtr)mappedSizeInterrupts); mapInterrupts = LibC.MAP_FAILED; } fileInterrupts.finalize(); if (mapMem != LibC.MAP_FAILED) { LibC.munmap(mapMem, (UIntPtr)mappedSizeMem); mapMem = LibC.MAP_FAILED; } fileMem.finalize(); }
public void finalize() { if (mappedAddress == default) { return; } int returnedValue = LibC.munmap(mappedAddress, (UIntPtr)mappedLength); if (0 == returnedValue) { return; } var ex = LibC.exception("MappedOutput.finalize", returnedValue); Logger.logWarning("{0}", ex.Message); }