Ejemplo n.º 1
0
        //==============================================================================
        // getBlockSize
        //==============================================================================
        public uint getBlockSize(uint pBlock)
        {
            LineAlloc la = getLineContaining(pBlock);

            if (la == null)
            {
                return(0);
            }

            return(la.getBlockSize(pBlock));
        }
Ejemplo n.º 2
0
        //==============================================================================
        // deleteMem
        //==============================================================================
        public void deleteMem(uint pBlock)
        {
            LineAlloc la = getLineContaining(pBlock);

            mBlockToLineNum.Remove(pBlock);

            if (la != null)
            {
                mTotalBytes -= la.getBlockSize(pBlock);
                la.deleteMem(pBlock);

                if (la.getTotalAllocatedBytes() == 0)
                {
                    mAllocations.Remove(la);
                }
                return;
            }

            GlobalErrors.addError("FileAlloc : Stray Delete of block 0x" + pBlock.ToString("x"));
        }