Ejemplo n.º 1
0
 public StagingBlock(byte[] array, uint sizeInBytes, StagingMemoryPool pool)
 {
     Debug.Assert(array != null);
     Debug.Assert(array.Length > 0);
     Debug.Assert(sizeInBytes > 0);
     Array       = array;
     SizeInBytes = sizeInBytes;
     Pool        = pool;
 }
Ejemplo n.º 2
0
 public FixedStagingBlock(byte[] array, uint sizeInBytes, StagingMemoryPool pool)
 {
     Debug.Assert(array != null);
     Debug.Assert(array.Length > 0);
     Debug.Assert(sizeInBytes > 0);
     Array       = array;
     SizeInBytes = sizeInBytes;
     Pool        = pool;
     GCHandle    = GCHandle.Alloc(array, GCHandleType.Pinned);
     Data        = (void *)GCHandle.AddrOfPinnedObject();
 }