From a2996e9ae5f7e9c44a8848e44cc91417ddf418c4 Mon Sep 17 00:00:00 2001 From: Kevin Montrose Date: Tue, 7 Jan 2025 14:40:17 -0500 Subject: [PATCH] formatting --- benchmark/BDN.benchmark/Operations/ScriptOperations.cs | 2 +- libs/server/Lua/LuaLimitedManagedAllocator.cs | 4 ++-- test/Garnet.test/LuaScriptRunnerTests.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmark/BDN.benchmark/Operations/ScriptOperations.cs b/benchmark/BDN.benchmark/Operations/ScriptOperations.cs index 96099992ec..b8298912eb 100644 --- a/benchmark/BDN.benchmark/Operations/ScriptOperations.cs +++ b/benchmark/BDN.benchmark/Operations/ScriptOperations.cs @@ -204,7 +204,7 @@ public void GlobalSetup() }; server = new EmbeddedRespServer(opts); - + session = server.GetRespSession(); SetupOperation(ref scriptLoad, SCRIPT_LOAD); diff --git a/libs/server/Lua/LuaLimitedManagedAllocator.cs b/libs/server/Lua/LuaLimitedManagedAllocator.cs index 685b82008b..7d63b55ee8 100644 --- a/libs/server/Lua/LuaLimitedManagedAllocator.cs +++ b/libs/server/Lua/LuaLimitedManagedAllocator.cs @@ -395,7 +395,7 @@ public ref byte AllocateNew(int sizeBytes, out bool failed) public void Free(ref byte start, int sizeBytes) { ref var dataStartRef = ref GetDataStartRef(); - + ref var blockRef = ref GetBlockRef(ref dataStartRef, ref start); Debug.Assert(blockRef.IsInUse, "Should be in use"); @@ -414,7 +414,7 @@ public void Free(ref byte start, int sizeBytes) public ref byte ResizeAllocation(ref byte start, int oldSizeBytes, int newSizeBytes, out bool failed) { ref var dataStartRef = ref GetDataStartRef(); - + ref var curBlock = ref GetBlockRef(ref dataStartRef, ref start); Debug.Assert(curBlock.IsInUse, "Shouldn't be resizing an allocation that isn't in use"); diff --git a/test/Garnet.test/LuaScriptRunnerTests.cs b/test/Garnet.test/LuaScriptRunnerTests.cs index 94615e7dca..7a9bef4ae8 100644 --- a/test/Garnet.test/LuaScriptRunnerTests.cs +++ b/test/Garnet.test/LuaScriptRunnerTests.cs @@ -329,7 +329,7 @@ public unsafe void LuaLimittedManaged() // Free in a random order toFree = toFree.Select(p => (Pointer: p, Order: rand.Next())).OrderBy(t => t.Order).Select(t => t.Pointer).ToList(); - for(var j = 0; j < toFree.Count; j++) + for (var j = 0; j < toFree.Count; j++) { var ptr = toFree[j]; ref var asData = ref Unsafe.AsRef((void*)ptr);