Пример #1
0
        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;
            }
        }
Пример #2
0
        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();
        }
Пример #3
0
        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);
        }