From 8f913eabccd46b035c1e5dc19f41fb48713d55db Mon Sep 17 00:00:00 2001 From: Quajak Date: Sat, 24 Oct 2020 18:36:09 +0200 Subject: [PATCH] Allow larger alignments --- source/Cosmos.Core/ManagedMemoryBlock.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Cosmos.Core/ManagedMemoryBlock.cs b/source/Cosmos.Core/ManagedMemoryBlock.cs index a0ad20f1d..2a09827d8 100644 --- a/source/Cosmos.Core/ManagedMemoryBlock.cs +++ b/source/Cosmos.Core/ManagedMemoryBlock.cs @@ -31,7 +31,7 @@ namespace Cosmos.Core /// /// Size of buffer /// Byte Boundary alignment - public ManagedMemoryBlock(UInt32 size, byte alignment) + public ManagedMemoryBlock(UInt32 size, int alignment) : this(size, alignment, true) { } @@ -41,7 +41,7 @@ namespace Cosmos.Core /// Size of buffer /// Byte Boundary alignment /// true if buffer should be aligned, false otherwise - public ManagedMemoryBlock(UInt32 size, byte alignment, bool align) + public ManagedMemoryBlock(UInt32 size, int alignment, bool align) { memory = new byte[size + alignment - 1]; fixed (byte* bodystart = memory)