Emul8.Peripherals.CPU.TranslationCPU.ValidateMemoryRangeAndThrow C# (CSharp) Method

ValidateMemoryRangeAndThrow() private method

private ValidateMemoryRangeAndThrow ( uint startAddress, uint uintSize ) : void
startAddress uint
uintSize uint
return void
        private void ValidateMemoryRangeAndThrow(uint startAddress, uint uintSize)
        {
            var pageSize = TlibGetPageSize();
            if((startAddress % pageSize) != 0)
            {
                throw new RecoverableException("Memory offset has to be aligned to guest page size.");
            }
            if(uintSize % pageSize != 0)
            {
                throw new RecoverableException("Memory size has to be aligned to guest page size.");
            }
        }
TranslationCPU