The structure is zeroed with dvmAllocRegion (use to be calloc) which for most
implementations of pthreads behaves correctly as if initialized. However, an explicit
initialization is more correct.
Change-Id: I172fed73c2a8a6962d720f78c60436b4f58cc168
pDvmDex->pInterfaceCache = dvmAllocAtomicCache(DEX_INTERFACE_CACHE_SIZE);
+ dvmInitMutex(&pDvmDex->modLock);
+
return pDvmDex;
}
if (pDvmDex == NULL)
return;
+ dvmDestroyMutex(&pDvmDex->modLock);
+
totalSize = pDvmDex->pHeader->stringIdsSize * sizeof(struct StringObject*);
totalSize += pDvmDex->pHeader->typeIdsSize * sizeof(struct ClassObject*);
totalSize += pDvmDex->pHeader->methodIdsSize * sizeof(struct Method*);