示例#1
0
        //=========================================
        // onDelete
        //=========================================
        public void onDelete(uint mpHeap, uint mpBlock, HaloWarsMem.BALContext context)
        {
            XBOXMemView.VirtualAddressInfo vai = XBOXMemView.getVirtualAddressInfo(mpBlock);
            if (vai.mMemRegion != XBOXMemView.VirtualAddressInfo.eMemRegion.ePhysical)
            {
                return;
            }

            uint translatedAddress = XBOXMemView.convertVirtualAddrToPhysicalAddr(mpBlock);

            mPhysicalMemoryRange.onDelete(mpHeap, translatedAddress, context);
        }
示例#2
0
        //=========================================
        // onResize
        //=========================================
        public void onResize(uint mpHeap, uint mpOrigBlock, uint mNewSize, uint mpNewBlock, HaloWarsMem.BALContext context)
        {
            XBOXMemView.VirtualAddressInfo vai = XBOXMemView.getVirtualAddressInfo(mpOrigBlock);

            if (vai.mMemRegion == XBOXMemView.VirtualAddressInfo.eMemRegion.eVirtual)
            {
                if (vai.mSizeOfContainingPage == XBOXMemView.VirtualAddressInfo.ePageSize.e4k)
                {
                    mVirtual4KRange.onResize(mpHeap, mpOrigBlock, mNewSize, mpNewBlock, context);
                }
                else if (vai.mSizeOfContainingPage == XBOXMemView.VirtualAddressInfo.ePageSize.e64k)
                {
                    mVirtual64KRange.onResize(mpHeap, mpOrigBlock, mNewSize, mpNewBlock, context);
                }
            }
            else if (vai.mMemRegion == XBOXMemView.VirtualAddressInfo.eMemRegion.eImage)
            {
                if (vai.mSizeOfContainingPage == XBOXMemView.VirtualAddressInfo.ePageSize.e4k)
                {
                    mImage4KRange.onResize(mpHeap, mpOrigBlock, mNewSize, mpNewBlock, context);
                }
                else if (vai.mSizeOfContainingPage == XBOXMemView.VirtualAddressInfo.ePageSize.e64k)
                {
                    mImage64KRange.onResize(mpHeap, mpOrigBlock, mNewSize, mpNewBlock, context);
                }
            }
            else if (vai.mMemRegion == XBOXMemView.VirtualAddressInfo.eMemRegion.eEncrypted)
            {
                mEncrypted64KRange.onResize(mpHeap, mpOrigBlock, mNewSize, mpNewBlock, context);
            }
            else if (vai.mMemRegion == XBOXMemView.VirtualAddressInfo.eMemRegion.ePhysical)
            {
                if (vai.mSizeOfContainingPage == XBOXMemView.VirtualAddressInfo.ePageSize.e4k)
                {
                    Physical4KRange.onResize(mpHeap, mpOrigBlock, mNewSize, mpNewBlock, context);
                }
                else if (vai.mSizeOfContainingPage == XBOXMemView.VirtualAddressInfo.ePageSize.e64k)
                {
                    Physical64KRange.onResize(mpHeap, mpOrigBlock, mNewSize, mpNewBlock, context);
                }
                else if (vai.mSizeOfContainingPage == XBOXMemView.VirtualAddressInfo.ePageSize.e16m)
                {
                    mPhysical16MBRange.onResize(mpHeap, mpOrigBlock, mNewSize, mpNewBlock, context);
                }
            }
        }