aboutsummaryrefslogtreecommitdiff
path: root/lib/Utils
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-05-15 21:57:39 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-05-15 21:57:39 -0400
commit9a964795757bf0da4dd7fcab15ad304f4ea3fdf1 (patch)
tree027eaca81d744eaa438f0f25c680848974c549e8 /lib/Utils
parent4035c838c1508af0aa7e767a97431a692958ce1c (diff)
refactor: Harden some argon2 password hashing
Diffstat (limited to 'lib/Utils')
-rw-r--r--lib/Utils/src/Memory/IUnmangedHeap.cs7
-rw-r--r--lib/Utils/src/Memory/UnmanagedHeapBase.cs2
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/Utils/src/Memory/IUnmangedHeap.cs b/lib/Utils/src/Memory/IUnmangedHeap.cs
index fdc0f9b..e6f82e0 100644
--- a/lib/Utils/src/Memory/IUnmangedHeap.cs
+++ b/lib/Utils/src/Memory/IUnmangedHeap.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2023 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Utils
@@ -42,7 +42,10 @@ namespace VNLib.Utils.Memory
/// <param name="size">The size (in bytes) of the element</param>
/// <param name="elements">The number of elements to allocate</param>
/// <param name="zero">An optional parameter to zero the block of memory</param>
- /// <returns></returns>
+ /// <returns>A memory address to a valid block on the heap</returns>
+ /// <remarks>
+ /// If the heap is unable to allocate the requested memory, an OutOfMemoryException will be thrown
+ /// </remarks>
/// <exception cref="OutOfMemoryException"></exception>
IntPtr Alloc(nuint elements, nuint size, bool zero);
diff --git a/lib/Utils/src/Memory/UnmanagedHeapBase.cs b/lib/Utils/src/Memory/UnmanagedHeapBase.cs
index 599d8d9..7f42761 100644
--- a/lib/Utils/src/Memory/UnmanagedHeapBase.cs
+++ b/lib/Utils/src/Memory/UnmanagedHeapBase.cs
@@ -67,7 +67,7 @@ namespace VNLib.Utils.Memory
DangerousAddRef(ref handleCountIncremented);
//Failed to increment ref count, class has been disposed
- ObjectDisposedException.ThrowIf(handleCountIncremented == false, "The handle has been released");
+ ObjectDisposedException.ThrowIf(handleCountIncremented == false, this);
try
{