1 // 2 // Copyright (c) 2010-2024 Antmicro 3 // Copyright (c) 2011-2015 Realtime Embedded 4 // 5 // This file is licensed under the MIT License. 6 // Full license text is available in 'licenses/MIT.txt'. 7 // 8 using System; 9 10 namespace Antmicro.Renode.Core 11 { 12 public interface IMappedSegment 13 { 14 IntPtr Pointer { get; } 15 ulong StartingOffset { get; } 16 ulong Size { get; } Touch()17 void Touch(); 18 } 19 20 public static class IMappedSegmentExtensions 21 { GetRange(this IMappedSegment segment)22 public static Range GetRange(this IMappedSegment segment) 23 { 24 return new Range(segment.StartingOffset, segment.Size); 25 } 26 } 27 } 28 29