Changeset 46450 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 7, 2013 7:41:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/STAM.cpp
r46447 r46450 1165 1165 { 1166 1166 Assert(pRoot); Assert(!pRoot->pParent); 1167 PSTAMLOOKUP p Lookup= pRoot;1167 PSTAMLOOKUP pCur = pRoot; 1168 1168 for (;;) 1169 1169 { 1170 uint32_t i = p Lookup->cChildren;1170 uint32_t i = pCur->cChildren; 1171 1171 if (i > 0) 1172 1172 { … … 1174 1174 * Push child (with leaf optimization). 1175 1175 */ 1176 PSTAMLOOKUP pChild = p Lookup->papChildren[--i];1176 PSTAMLOOKUP pChild = pCur->papChildren[--i]; 1177 1177 if (pChild->cChildren != 0) 1178 p Lookup= pChild;1178 pCur = pChild; 1179 1179 else 1180 1180 { … … 1188 1188 } 1189 1189 RTMemFree(pChild); 1190 pCur->papChildren[i] = NULL; 1190 1191 1191 1192 /* next */ 1192 1193 if (i == 0) 1193 1194 { 1194 p Lookup->papChildren = 0;1195 pCur->cChildren = 0; 1195 1196 break; 1196 1197 } 1197 pChild = p Lookup->papChildren[--i];1198 pChild = pCur->papChildren[--i]; 1198 1199 if (pChild->cChildren != 0) 1199 1200 { 1200 p Lookup->cChildren = i + 1;1201 p Lookup= pChild;1201 pCur->cChildren = i + 1; 1202 pCur = pChild; 1202 1203 break; 1203 1204 } … … 1210 1211 * Pop and free current. 1211 1212 */ 1212 Assert(!pLookup->pDesc); 1213 1214 PSTAMLOOKUP pParent = pLookup->pParent; 1215 RTMemFree(pLookup->papChildren); 1216 pLookup->papChildren = NULL; 1217 RTMemFree(pLookup); 1218 1219 pLookup = pParent; 1220 if (!pLookup) 1213 Assert(!pCur->pDesc); 1214 1215 PSTAMLOOKUP pParent = pCur->pParent; 1216 Assert(pCur->iParent == (pParent ? pParent->cChildren - 1 : UINT16_MAX)); 1217 1218 RTMemFree(pCur->papChildren); 1219 pCur->papChildren = NULL; 1220 RTMemFree(pCur); 1221 1222 pCur = pParent; 1223 if (!pCur) 1221 1224 break; 1222 p Lookup->cChildren--;1225 pCur->papChildren[--pCur->cChildren] = NULL; 1223 1226 } 1224 1227 }
Note:
See TracChangeset
for help on using the changeset viewer.