Exemple #1
0
 public void Init(int[] offsets, int totalMemSize)
 {
     _pDatas         = NativeHelper.AllocAndZero(totalMemSize);
     _dataOffset     = offsets;
     HasVisitedInfos = new bool[offsets.Length];
     _dataLen        = totalMemSize;
 }
Exemple #2
0
        public PtrList(int initSize = AlignSize)
        {
            initSize = LMath.Max(AlignSize, initSize);
            if (initSize % AlignSize != 0)
            {
                initSize = (initSize % AlignSize + 1) * AlignSize;
            }

            capacity   = initSize;
            count      = 0;
            _ptrs      = (void **)NativeHelper.AllocAndZero(sizeof(void *) * initSize);
            _dirtyBits = (byte *)NativeHelper.AllocAndZero(initSize / 8);
        }