mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 01:49:39 -06:00
add comments
This commit is contained in:
@ -289,6 +289,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
|||||||
{
|
{
|
||||||
RangeItem<BufferModifiedRange>[] overlaps = new RangeItem<BufferModifiedRange>[1];
|
RangeItem<BufferModifiedRange>[] overlaps = new RangeItem<BufferModifiedRange>[1];
|
||||||
|
|
||||||
|
// We use the non-span method here because keeping the lock will cause a deadlock.
|
||||||
Lock.EnterReadLock();
|
Lock.EnterReadLock();
|
||||||
OverlapResult result = FindOverlapsNonOverlapping(address, size, ref overlaps);
|
OverlapResult result = FindOverlapsNonOverlapping(address, size, ref overlaps);
|
||||||
Lock.ExitReadLock();
|
Lock.ExitReadLock();
|
||||||
@ -409,6 +410,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// We use the non-span method here because the array is partially modified by the code, which would invalidate a span.
|
||||||
rangeCount = FindOverlapsNonOverlapping(address, size, ref overlaps).Count;
|
rangeCount = FindOverlapsNonOverlapping(address, size, ref overlaps).Count;
|
||||||
}
|
}
|
||||||
Lock.ExitReadLock();
|
Lock.ExitReadLock();
|
||||||
|
@ -299,6 +299,7 @@ namespace Ryujinx.Memory.Tracking
|
|||||||
NonOverlappingRangeList<VirtualRegion> regions = guest ? _guestVirtualRegions : _virtualRegions;
|
NonOverlappingRangeList<VirtualRegion> regions = guest ? _guestVirtualRegions : _virtualRegions;
|
||||||
ref RangeItem<VirtualRegion>[] overlaps = ref ThreadStaticArray<RangeItem<VirtualRegion>>.Get();
|
ref RangeItem<VirtualRegion>[] overlaps = ref ThreadStaticArray<RangeItem<VirtualRegion>>.Get();
|
||||||
|
|
||||||
|
// We use the non-span method here because keeping the lock will cause a deadlock.
|
||||||
regions.Lock.EnterReadLock();
|
regions.Lock.EnterReadLock();
|
||||||
OverlapResult result = regions.FindOverlapsNonOverlapping(address, size, ref overlaps);
|
OverlapResult result = regions.FindOverlapsNonOverlapping(address, size, ref overlaps);
|
||||||
regions.Lock.ExitReadLock();
|
regions.Lock.ExitReadLock();
|
||||||
|
Reference in New Issue
Block a user