Changeset 33540 in vbox for trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
- Timestamp:
- Oct 28, 2010 9:27:05 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 67140
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r32431 r33540 31 31 * by the #GMM_CHUNK_SIZE \#define. 32 32 * 33 * Each chunk is given an un quie ID. Each page also has a unique ID. The33 * Each chunk is given an unique ID. Each page also has a unique ID. The 34 34 * relation ship between the two IDs is: 35 35 * @code … … 94 94 * The per page cost in kernel space is 32-bit plus whatever RTR0MEMOBJ 95 95 * entails. In addition there is the chunk cost of approximately 96 * (sizeof(RT0MEMOBJ) + siz of(CHUNK)) / 2^CHUNK_SHIFT bytes per page.96 * (sizeof(RT0MEMOBJ) + sizeof(CHUNK)) / 2^CHUNK_SHIFT bytes per page. 97 97 * 98 98 * On Windows the per page #RTR0MEMOBJ cost is 32-bit on 32-bit windows … … 112 112 * 113 113 * One simple fast mutex will be employed in the initial implementation, not 114 * two as me tioned in @ref subsec_pgmPhys_Serializing.114 * two as mentioned in @ref subsec_pgmPhys_Serializing. 115 115 * 116 116 * @see @ref subsec_pgmPhys_Serializing … … 293 293 /** A private page. */ 294 294 #define GMM_PAGE_STATE_PRIVATE 0 295 /** A private page - alternative value used on the 32-bit implemen ation.295 /** A private page - alternative value used on the 32-bit implementation. 296 296 * This will never be used on 64-bit hosts. */ 297 297 #define GMM_PAGE_STATE_PRIVATE_32 1 … … 489 489 490 490 /** Shared module tree (global). */ 491 /** @todo sep erate trees for distinctly different guest OSes. */491 /** @todo separate trees for distinctly different guest OSes. */ 492 492 PAVLGCPTRNODECORE pGlobalSharedModuleTree; 493 493 … … 1115 1115 * @param cBasePages The number of pages that may be allocated for the base RAM and ROMs. 1116 1116 * This does not include MMIO2 and similar. 1117 * @param cShadowPages The number of pages that may be allocated for shadow pag eing structures.1117 * @param cShadowPages The number of pages that may be allocated for shadow paging structures. 1118 1118 * @param cFixedPages The number of pages that may be allocated for fixed objects like the 1119 1119 * hyper heap, MMIO2 and similar. … … 1154 1154 { 1155 1155 /* 1156 * Check if we can accom odate this.1156 * Check if we can accommodate this. 1157 1157 */ 1158 1158 /* ... later ... */ … … 1216 1216 * @param cBasePages The number of pages that may be allocated for the base RAM and ROMs. 1217 1217 * This does not include MMIO2 and similar. 1218 * @param cShadowPages The number of pages that may be allocated for shadow pag eing structures.1218 * @param cShadowPages The number of pages that may be allocated for shadow paging structures. 1219 1219 * @param cFixedPages The number of pages that may be allocated for fixed objects like the 1220 1220 * hyper heap, MMIO2 and similar. … … 1250 1250 { 1251 1251 /* 1252 * Check if we can accom odate this.1252 * Check if we can accommodate this. 1253 1253 */ 1254 1254 /* ... later ... */ … … 2359 2359 } 2360 2360 2361 /* Allocate a new contin ous chunk. */2361 /* Allocate a new continuous chunk. */ 2362 2362 rc = gmmR0AllocateOneChunk(pGMM, &pGMM->Private, pGVM->hSelf, GMMCHUNKTYPE_CONTINUOUS, &pChunk); 2363 2363 if (RT_FAILURE(rc)) … … 2928 2928 * @retval VERR_GMM_ATTEMPT_TO_FREE_TOO_MUCH 2929 2929 * @retval VERR_GMM_ATTEMPT_TO_DEFLATE_TOO_MUCH 2930 * @retval VERR_GMM_OVERCOMMIT ED_TRY_AGAIN_IN_A_BIT - reset condition2930 * @retval VERR_GMM_OVERCOMMITTED_TRY_AGAIN_IN_A_BIT - reset condition 2931 2931 * indicating that we won't necessarily have sufficient RAM to boot 2932 2932 * the VM again and that it should pause until this changes (we'll try … … 2959 2959 2960 2960 /* 2961 * Take the sem pahore and do some more validations.2961 * Take the semaphore and do some more validations. 2962 2962 */ 2963 2963 rc = RTSemFastMutexRequest(pGMM->Mtx); … … 3138 3138 3139 3139 /* 3140 * Take the sem pahore and do some more validations.3140 * Take the semaphore and do some more validations. 3141 3141 */ 3142 3142 rc = RTSemFastMutexRequest(pGMM->Mtx); … … 3539 3539 3540 3540 /* 3541 * Take the sem pahore and do some more validations.3541 * Take the semaphore and do some more validations. 3542 3542 */ 3543 3543 rc = RTSemFastMutexRequest(pGMM->Mtx); … … 3659 3659 pRecVM->pGlobalModule = pGlobalModule; 3660 3660 if ( fNewModule 3661 || pRecVM->fCollision == true) /* colliding module unregistered and new one register d since the last check */3661 || pRecVM->fCollision == true) /* colliding module unregistered and new one registered since the last check */ 3662 3662 { 3663 3663 pGlobalModule->cUsers++; … … 3739 3739 3740 3740 /* 3741 * Take the sem pahore and do some more validations.3741 * Take the semaphore and do some more validations. 3742 3742 */ 3743 3743 rc = RTSemFastMutexRequest(pGMM->Mtx); … … 4056 4056 4057 4057 /* 4058 * Take the sem pahore and do some more validations.4058 * Take the semaphore and do some more validations. 4059 4059 */ 4060 4060 rc = RTSemFastMutexRequest(pGMM->Mtx); … … 4123 4123 4124 4124 /* 4125 * Take the sem pahore and do some more validations.4125 * Take the semaphore and do some more validations. 4126 4126 */ 4127 4127 int rc = RTSemFastMutexRequest(pGMM->Mtx); … … 4176 4176 # ifndef DEBUG_sandervl 4177 4177 /* 4178 * Take the sem pahore and do some more validations.4178 * Take the semaphore and do some more validations. 4179 4179 */ 4180 4180 rc = RTSemFastMutexRequest(pGMM->Mtx); … … 4287 4287 4288 4288 /* 4289 * Take the sem pahore and do some more validations.4289 * Take the semaphore and do some more validations. 4290 4290 */ 4291 4291 int rc = RTSemFastMutexRequest(pGMM->Mtx);
Note:
See TracChangeset
for help on using the changeset viewer.