aboutsummaryrefslogtreecommitdiff
path: root/lib/Utils/src
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-03-09 21:41:15 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2023-03-09 21:41:15 -0500
commit606e9b3331e73d68da38ec8139051ee1d0149061 (patch)
tree617e9ed2ee0a4be9c4fbf4c47116366648056f5b /lib/Utils/src
parent5ddef0fcb742e77b99a0e17015d2eea0a1d4131a (diff)
Minor HTTP buffs
Diffstat (limited to 'lib/Utils/src')
-rw-r--r--lib/Utils/src/Extensions/MemoryExtensions.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Utils/src/Extensions/MemoryExtensions.cs b/lib/Utils/src/Extensions/MemoryExtensions.cs
index 17ad79d..237a567 100644
--- a/lib/Utils/src/Extensions/MemoryExtensions.cs
+++ b/lib/Utils/src/Extensions/MemoryExtensions.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2022 Vaughn Nugent
+* Copyright (c) 2023 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Utils
@@ -28,10 +28,11 @@ using System.Buffers;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
+using VNLib.Utils.Memory;
+using VNLib.Utils.Resources;
+
namespace VNLib.Utils.Extensions
{
- using Utils.Memory;
- using VNLib.Utils.Resources;
/// <summary>
/// Provides memory based extensions to .NET and VNLib memory abstractions
@@ -52,7 +53,7 @@ namespace VNLib.Utils.Extensions
//Pool buffer handles are considered "safe" so im reusing code for now
return new(pool, size, zero);
}
-
+
/// <summary>
/// Retreives a buffer that is at least the reqested length, and clears the array from 0-size.
/// <br></br>
@@ -70,7 +71,7 @@ namespace VNLib.Utils.Extensions
//If zero flag is set, zero only the used section
if (zero)
{
- Array.Fill(arr, default);
+ arr.AsSpan().Clear();
}
return arr;
}