Lines Matching refs:gDvm
79 dvmInitMutex(&gDvm.allocTrackerLock); in dvmAllocTrackerStartup()
82 assert(gDvm.allocRecords == NULL); in dvmAllocTrackerStartup()
92 free(gDvm.allocRecords); in dvmAllocTrackerShutdown()
93 dvmDestroyMutex(&gDvm.allocTrackerLock); in dvmAllocTrackerShutdown()
111 dvmLockMutex(&gDvm.allocTrackerLock); in dvmEnableAllocTracker()
113 if (gDvm.allocRecords == NULL) { in dvmEnableAllocTracker()
117 gDvm.allocRecordHead = gDvm.allocRecordCount = 0; in dvmEnableAllocTracker()
118 gDvm.allocRecords = in dvmEnableAllocTracker()
121 if (gDvm.allocRecords == NULL) in dvmEnableAllocTracker()
125 dvmUnlockMutex(&gDvm.allocTrackerLock); in dvmEnableAllocTracker()
134 dvmLockMutex(&gDvm.allocTrackerLock); in dvmDisableAllocTracker()
136 if (gDvm.allocRecords != NULL) { in dvmDisableAllocTracker()
137 free(gDvm.allocRecords); in dvmDisableAllocTracker()
138 gDvm.allocRecords = NULL; in dvmDisableAllocTracker()
141 dvmUnlockMutex(&gDvm.allocTrackerLock); in dvmDisableAllocTracker()
189 dvmLockMutex(&gDvm.allocTrackerLock); in dvmDoTrackAllocation()
190 if (gDvm.allocRecords == NULL) in dvmDoTrackAllocation()
200 if (++gDvm.allocRecordHead == kNumAllocRecords) in dvmDoTrackAllocation()
201 gDvm.allocRecordHead = 0; in dvmDoTrackAllocation()
203 AllocRecord* pRec = &gDvm.allocRecords[gDvm.allocRecordHead]; in dvmDoTrackAllocation()
210 if (gDvm.allocRecordCount < kNumAllocRecords) in dvmDoTrackAllocation()
211 gDvm.allocRecordCount++; in dvmDoTrackAllocation()
214 dvmUnlockMutex(&gDvm.allocTrackerLock); in dvmDoTrackAllocation()
282 return (gDvm.allocRecordHead+1 + kNumAllocRecords - gDvm.allocRecordCount) in headIndex()
324 int count = gDvm.allocRecordCount; in populateStringTables()
331 AllocRecord* pRec = &gDvm.allocRecords[idx]; in populateStringTables()
376 int count = gDvm.allocRecordCount; in generateBaseOutput()
392 AllocRecord* pRec = &gDvm.allocRecords[idx]; in generateBaseOutput()
510 dvmLockMutex(&gDvm.allocTrackerLock); in dvmGenerateTrackedAllocationReport()
586 dvmUnlockMutex(&gDvm.allocTrackerLock); in dvmGenerateTrackedAllocationReport()
602 dvmLockMutex(&gDvm.allocTrackerLock); in dvmDumpTrackedAllocations()
603 if (gDvm.allocRecords == NULL) in dvmDumpTrackedAllocations()
611 int count = gDvm.allocRecordCount; in dvmDumpTrackedAllocations()
614 gDvm.allocRecordHead, count); in dvmDumpTrackedAllocations()
616 AllocRecord* pRec = &gDvm.allocRecords[idx]; in dvmDumpTrackedAllocations()
646 dvmUnlockMutex(&gDvm.allocTrackerLock); in dvmDumpTrackedAllocations()