public unsafe void AllocatesAlignedToMultipleOf64(int size) { var buffer = ArrowBuffer.Allocate(size, _memoryPoolFixture.MemoryPool); using (var pin = buffer.Memory.Pin()) { var ptr = new IntPtr(pin.Pointer); Assert.True(ptr.ToInt64() % 64 == 0); } }
public void HasZeroPadding() { var buffer = ArrowBuffer.Allocate(32, _memoryPoolFixture.MemoryPool); var span = buffer.GetSpan <byte>(); foreach (var b in span) { Assert.Equal(0, b); } }
public void AllocatesWithExpectedPadding(int size, int expectedCapacity) { var buffer = ArrowBuffer.Allocate(size, _memoryPoolFixture.MemoryPool); Assert.Equal(buffer.Capacity, expectedCapacity); }