Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-montrose committed Jan 7, 2025
1 parent a112acb commit a2996e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benchmark/BDN.benchmark/Operations/ScriptOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public void GlobalSetup()
};

server = new EmbeddedRespServer(opts);

session = server.GetRespSession();

SetupOperation(ref scriptLoad, SCRIPT_LOAD);
Expand Down
4 changes: 2 additions & 2 deletions libs/server/Lua/LuaLimitedManagedAllocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");

Expand Down
2 changes: 1 addition & 1 deletion test/Garnet.test/LuaScriptRunnerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<byte>((void*)ptr);
Expand Down

0 comments on commit a2996e9

Please sign in to comment.