예제 #1
0
    //---------------------------------------------------------------------
    void ObjectMemoryManager::performCleanup( ArrayMemoryManager::ManagerType managerType, uint16 level,
                                        const MemoryPoolVec &basePtrs, size_t const *elementsMemSizes,
                                        size_t startInstance, size_t diffInstances )
    {
        ObjectData objectData;
        const size_t numObjs = this->getFirstObjectData( objectData, level );

        size_t roundedStart = startInstance / ARRAY_PACKED_REALS;

        objectData.advancePack( roundedStart );

        for( size_t i=roundedStart * ARRAY_PACKED_REALS; i<numObjs; i += ARRAY_PACKED_REALS )
        {
            for( size_t j=0; j<ARRAY_PACKED_REALS; ++j )
            {
                if( objectData.mOwner[j] )
                {
                    objectData.mIndex = j;
                    objectData.mOwner[j]->_getObjectData() = objectData;
                }
            }

            objectData.advancePack();
        }
    }
예제 #2
0
    //---------------------------------------------------------------------
    void ObjectMemoryManager::applyRebase( ArrayMemoryManager::ManagerType managerType, uint16 level,
                                            const MemoryPoolVec &newBasePtrs,
                                            const ArrayMemoryManager::PtrdiffVec &diffsList )
    {
        ObjectData objectData;
        const size_t numObjs = this->getFirstObjectData( objectData, level );

        for( size_t i=0; i<numObjs; i += ARRAY_PACKED_REALS )
        {
            for( size_t j=0; j<ARRAY_PACKED_REALS; ++j )
            {
                if( objectData.mOwner[j] )
                {
                    objectData.mIndex = j;
                    objectData.mOwner[j]->_getObjectData() = objectData;
                }
            }

            objectData.advancePack();
        }
    }