示例#1
0
 public NetMapBufferPool(ushort bufferLength, IntPtr bufferStart, uint numberOfBuffers)
 {
     _memoryPool = new NetMapOwnedMemory[numberOfBuffers];
     for (var i = 0; i < numberOfBuffers; i++)
     {
         _memoryPool[i] = new NetMapOwnedMemory(IntPtr.Add(bufferStart, i * bufferLength), bufferLength, (uint)i);
     }
 }
示例#2
0
 public NetMapMemoryWrapper(NetMapOwnedMemory ownedMemory) => _ownedMemory = ownedMemory;