Merge pull request #1535 from CosmosOS/quajak-patch-1

Allow larger alignments
This commit is contained in:
Charles Betros 2020-10-28 13:37:02 -05:00 committed by GitHub
commit 51f1d930a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ namespace Cosmos.Core
/// </summary>
/// <param name="size">Size of buffer</param>
/// <param name="alignment">Byte Boundary alignment</param>
public ManagedMemoryBlock(UInt32 size, byte alignment)
public ManagedMemoryBlock(UInt32 size, int alignment)
: this(size, alignment, true)
{ }
@ -41,7 +41,7 @@ namespace Cosmos.Core
/// <param name="size">Size of buffer</param>
/// <param name="alignment">Byte Boundary alignment</param>
/// <param name="align">true if buffer should be aligned, false otherwise</param>
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)