Пример #1
0
        public A(params int[] dimension)
        {
            this.Dimension = dimension;
            this.Stride    = A.BuildStride(dimension);

            int length = dimension.Length > 0 ? this.Stride[0] * dimension[0] : 0;

            this.Buffer = new T[length];
            this.count  = length;

            this.memoryPressure = this.SizeInBytes;
            MemoryPressure.Add(this.memoryPressure);
        }
Пример #2
0
        internal SafeMILHandleMemoryPressure(long gcPressure)
        {
            _gcPressure = gcPressure;
            _refCount   = 0;

            if (_gcPressure > SMALL_BITMAP_MEM)
            {
                MemoryPressure.Add(_gcPressure);
            }
            else
            {
                GC.AddMemoryPressure(_gcPressure);
            }
        }