diff options
Diffstat (limited to 'Ryujinx.Memory/MemoryBlock.cs')
-rw-r--r-- | Ryujinx.Memory/MemoryBlock.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Ryujinx.Memory/MemoryBlock.cs b/Ryujinx.Memory/MemoryBlock.cs index 25c66dfe..3561b81a 100644 --- a/Ryujinx.Memory/MemoryBlock.cs +++ b/Ryujinx.Memory/MemoryBlock.cs @@ -216,13 +216,14 @@ namespace Ryujinx.Memory } /// <summary> - /// Fills a region of memory with zeros. + /// Fills a region of memory with <paramref name="value"/>. /// </summary> - /// <param name="offset">Offset of the region to fill with zeros</param> + /// <param name="offset">Offset of the region to fill with <paramref name="value"/></param> /// <param name="size">Size in bytes of the region to fill</param> + /// <param name="value">Value to use for the fill</param> /// <exception cref="ObjectDisposedException">Throw when the memory block has already been disposed</exception> /// <exception cref="InvalidMemoryRegionException">Throw when either <paramref name="offset"/> or <paramref name="size"/> are out of range</exception> - public void ZeroFill(ulong offset, ulong size) + public void Fill(ulong offset, ulong size, byte value) { const int MaxChunkSize = 1 << 24; @@ -230,7 +231,7 @@ namespace Ryujinx.Memory { int copySize = (int)Math.Min(MaxChunkSize, size - subOffset); - GetSpan(offset + subOffset, copySize).Fill(0); + GetSpan(offset + subOffset, copySize).Fill(value); } } |