Ejemplo n.º 1
0
        private NativeStack(ref NativeStack <T> stack)
        {
            Debug.Assert(stack.IsValid);

            Allocator allocator = stack.GetAllocator() !;
            T *       buffer    = allocator.Allocate <T>(stack._capacity);

            Unsafe.CopyBlockUnaligned(buffer, stack._buffer, (uint)(sizeof(T) * stack._capacity));

            _buffer      = buffer;
            _capacity    = stack._capacity;
            _count       = stack._count;
            _allocatorID = stack._allocatorID;
        }
 public NativeStackDebugView(NativeStack <T> stack)
 {
     _stack = stack;
 }