Lines Matching refs:pCache

36 void dexStringCacheAlloc(DexStringCache* pCache, size_t length) {  in dexStringCacheAlloc()  argument
37 if (pCache->allocatedSize != 0) { in dexStringCacheAlloc()
38 if (pCache->allocatedSize >= length) { in dexStringCacheAlloc()
41 free((void*) pCache->value); in dexStringCacheAlloc()
44 if (length <= sizeof(pCache->buffer)) { in dexStringCacheAlloc()
45 pCache->value = pCache->buffer; in dexStringCacheAlloc()
46 pCache->allocatedSize = 0; in dexStringCacheAlloc()
48 pCache->value = (char*) malloc(length); in dexStringCacheAlloc()
49 pCache->allocatedSize = length; in dexStringCacheAlloc()
57 void dexStringCacheInit(DexStringCache* pCache) { in dexStringCacheInit() argument
58 pCache->value = pCache->buffer; in dexStringCacheInit()
59 pCache->allocatedSize = 0; in dexStringCacheInit()
60 pCache->buffer[0] = '\0'; in dexStringCacheInit()
67 void dexStringCacheRelease(DexStringCache* pCache) { in dexStringCacheRelease() argument
68 if (pCache->allocatedSize != 0) { in dexStringCacheRelease()
69 free((void*) pCache->value); in dexStringCacheRelease()
70 pCache->value = pCache->buffer; in dexStringCacheRelease()
71 pCache->allocatedSize = 0; in dexStringCacheRelease()
82 char* dexStringCacheEnsureCopy(DexStringCache* pCache, const char* value) { in dexStringCacheEnsureCopy() argument
83 if (value != pCache->value) { in dexStringCacheEnsureCopy()
85 dexStringCacheAlloc(pCache, length); in dexStringCacheEnsureCopy()
86 memcpy(pCache->value, value, length); in dexStringCacheEnsureCopy()
89 return pCache->value; in dexStringCacheEnsureCopy()
99 char* dexStringCacheAbandon(DexStringCache* pCache, const char* value) { in dexStringCacheAbandon() argument
100 if ((value == pCache->value) && (pCache->allocatedSize != 0)) { in dexStringCacheAbandon()
101 char* result = pCache->value; in dexStringCacheAbandon()
102 pCache->allocatedSize = 0; in dexStringCacheAbandon()
103 pCache->value = pCache->buffer; in dexStringCacheAbandon()
134 DexStringCache* pCache) { in dexProtoGetMethodDescriptor() argument
149 dexStringCacheAlloc(pCache, length); in dexProtoGetMethodDescriptor()
151 char *at = (char*) pCache->value; in dexProtoGetMethodDescriptor()
164 return pCache->value; in dexProtoGetMethodDescriptor()
178 DexStringCache* pCache) { in dexProtoGetParameterDescriptors() argument
195 dexStringCacheAlloc(pCache, length); in dexProtoGetParameterDescriptors()
196 char *at = (char*) pCache->value; in dexProtoGetParameterDescriptors()
208 return pCache->value; in dexProtoGetParameterDescriptors()