aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-03-27 02:20:16 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2023-03-27 02:20:16 -0400
commit208ae0f26408abe7f63a95bc28cb8e0bdb673efa (patch)
tree1a5f376c6d8d35a846c125032d4c7b7b7008f319
parent656dd4976249ca1ca707ed7e723796c3a0fde1a0 (diff)
Native heap api and alloc optimizations
-rw-r--r--lib/VNLib.Plugins.Extensions.Data/src/Storage/LWStorageDescriptor.cs2
-rw-r--r--lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNLib.Plugins.Extensions.Data/src/Storage/LWStorageDescriptor.cs b/lib/VNLib.Plugins.Extensions.Data/src/Storage/LWStorageDescriptor.cs
index cc9bd46..d410187 100644
--- a/lib/VNLib.Plugins.Extensions.Data/src/Storage/LWStorageDescriptor.cs
+++ b/lib/VNLib.Plugins.Extensions.Data/src/Storage/LWStorageDescriptor.cs
@@ -103,7 +103,7 @@ namespace VNLib.Plugins.Extensions.Data.Storage
//Calc and alloc decode buffer
int bufferSize = (int)(Entry.Data.Length * 1.75);
- using UnsafeMemoryHandle<byte> decodeBuffer = MemoryUtil.UnsafeAlloc<byte>(bufferSize);
+ using UnsafeMemoryHandle<byte> decodeBuffer = MemoryUtil.UnsafeAlloc(bufferSize);
//Decode and deserialize the data
return BrotliDecoder.TryDecompress(Entry.Data, decodeBuffer, out int written)
diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs b/lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs
index 25e30ea..4cf1c9d 100644
--- a/lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs
+++ b/lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs
@@ -330,7 +330,7 @@ namespace VNLib.Plugins.Extensions.Loading
_ = secret ?? throw new ArgumentNullException(nameof(secret));
//Temp buffer
- using UnsafeMemoryHandle<byte> buffer = MemoryUtil.UnsafeAlloc<byte>(secret.Result.Length);
+ using UnsafeMemoryHandle<byte> buffer = MemoryUtil.UnsafeAlloc(secret.Result.Length);
//Get base64
if(!Convert.TryFromBase64Chars(secret.Result, buffer, out int count))