aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Memory/MemoryBlock.cs
diff options
context:
space:
mode:
authorTSRBerry <20988865+TSRBerry@users.noreply.github.com>2023-06-24 02:46:04 +0200
committerGitHub <noreply@github.com>2023-06-24 02:46:04 +0200
commit7d160e98fde05e0b9b542dc04ea72dc34994bc5b (patch)
tree958d5f376a5a2421a7a58b21080eb454f9c744c1 /src/Ryujinx.Memory/MemoryBlock.cs
parentbf96bc84a82f2c4ab771b2ab0c610f86d00b1adf (diff)
MemoryManagement: Change return types for Commit/Decommit to void (#5325)
* Replace return type with void for Commit/Decommit * Small cleanup
Diffstat (limited to 'src/Ryujinx.Memory/MemoryBlock.cs')
-rw-r--r--src/Ryujinx.Memory/MemoryBlock.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Ryujinx.Memory/MemoryBlock.cs b/src/Ryujinx.Memory/MemoryBlock.cs
index 885ef456..2cf04628 100644
--- a/src/Ryujinx.Memory/MemoryBlock.cs
+++ b/src/Ryujinx.Memory/MemoryBlock.cs
@@ -1,6 +1,5 @@
using System;
using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
using System.Threading;
namespace Ryujinx.Memory
@@ -101,12 +100,12 @@ namespace Ryujinx.Memory
/// </summary>
/// <param name="offset">Starting offset of the range to be committed</param>
/// <param name="size">Size of the range to be committed</param>
- /// <returns>True if the operation was successful, false otherwise</returns>
+ /// <exception cref="SystemException">Throw when the operation was not successful</exception>
/// <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 bool Commit(ulong offset, ulong size)
+ public void Commit(ulong offset, ulong size)
{
- return MemoryManagement.Commit(GetPointerInternal(offset, size), size, _forJit);
+ MemoryManagement.Commit(GetPointerInternal(offset, size), size, _forJit);
}
/// <summary>
@@ -115,12 +114,12 @@ namespace Ryujinx.Memory
/// </summary>
/// <param name="offset">Starting offset of the range to be decommitted</param>
/// <param name="size">Size of the range to be decommitted</param>
- /// <returns>True if the operation was successful, false otherwise</returns>
+ /// <exception cref="SystemException">Throw when the operation was not successful</exception>
/// <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 bool Decommit(ulong offset, ulong size)
+ public void Decommit(ulong offset, ulong size)
{
- return MemoryManagement.Decommit(GetPointerInternal(offset, size), size);
+ MemoryManagement.Decommit(GetPointerInternal(offset, size), size);
}
/// <summary>