Lines Matching defs:keySize
57 void BlobCache::set(const void* key, size_t keySize, const void* value,
59 if (mMaxKeySize < keySize) {
61 keySize, mMaxKeySize);
69 if (mMaxTotalSize < keySize + valueSize) {
71 "large: %zu (limit: %zu)", keySize + valueSize, mMaxTotalSize);
74 if (keySize == 0) {
75 ALOGW("set: not caching because keySize is 0");
83 sp<Blob> dummyKey(new Blob(key, keySize, false));
90 sp<Blob> keyBlob(new Blob(key, keySize, true));
92 size_t newTotalSize = mTotalSize + keySize + valueSize;
102 keySize + valueSize, mMaxTotalSize);
109 keySize, valueSize);
123 keySize + valueSize, mMaxTotalSize);
130 "value", keySize, valueSize);
136 size_t BlobCache::get(const void* key, size_t keySize, void* value,
138 if (mMaxKeySize < keySize) {
140 keySize, mMaxKeySize);
143 sp<Blob> dummyKey(new Blob(key, keySize, false));
147 ALOGV("get: no cache entry found for key of size %zu", keySize);
203 size_t keySize = keyBlob->getSize();
206 size_t entrySize = sizeof(EntryHeader) + keySize + valueSize;
215 eheader->mKeySize = keySize;
218 memcpy(eheader->mData, keyBlob->getData(), keySize);
219 memcpy(eheader->mData + keySize, valueBlob->getData(), valueSize);
224 memset(eheader->mData + keySize + valueSize, 0, totalSize - entrySize);
270 size_t keySize = eheader->mKeySize;
272 size_t entrySize = sizeof(EntryHeader) + keySize + valueSize;
282 set(data, keySize, data + keySize, valueSize);