Home
last modified time | relevance | path

Searched refs:cache (Results 1 – 25 of 742) sorted by relevance

12345678910>>...30

/aosp12/frameworks/base/core/tests/coretests/src/android/util/
H A DLruCacheTest.java149 cache.put("a", "A"); in testToString()
150 cache.put("b", "B"); in testToString()
151 cache.put("c", "C"); in testToString()
152 cache.put("d", "D"); in testToString()
211 cache.put("a", ""); in testCustomSizesImpactsSize()
252 cache.put("a", a); in testEvictionThrowsWhenSizesAreInconsistent()
308 cache.evictAll(); in testEvictAll()
322 cache.evictAll(); in testEvictAllEvictsSizeZeroElements()
334 cache.remove("a"); in testRemoveWithCustomSizes()
359 cache.remove("a"); in testRemoveCallsEntryRemoved()
[all …]
H A DHashedStringCacheTest.java55 HashedStringCache cache = HashedStringCache.getInstance(); in testInstanceNotNull() local
56 assertThat(cache, is(notNullValue())); in testInstanceNotNull()
62 assertThat(HashedStringCache.getInstance(), is(cache)); in testInstanceMatchesOnSecondCall()
69 cache.hashString(mContext, TAG, TEST_STRING, 7); in testHashedStringNotOriginalString()
77 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleCallsResultInSameHash()
79 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleCallsResultInSameHash()
88 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleInputResultInDifferentHash()
98 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatZeroDaysResultsInNewHash()
141 cache.hashString(mContext, TAG, "", -1); in testEmptyStringInput()
149 cache.hashString(mContext, TAG, null, -1); in testNullInput()
[all …]
/aosp12/system/bt/gd/common/
H A Dlru_cache_test.cc32 EXPECT_EQ(cache.find(42), cache.end()); in TEST()
34 EXPECT_EQ(cache.find(42), cache.end()); in TEST()
171 EXPECT_EQ(cache.find(42), cache.end()); in TEST()
174 EXPECT_EQ(cache.find(42), cache.end()); in TEST()
176 EXPECT_NE(cache.find(56), cache.end()); in TEST()
200 EXPECT_EQ(cache.find(1), cache.end()); in TEST()
202 EXPECT_NE(iter = cache.find(4), cache.end()); in TEST()
204 EXPECT_NE(iter = cache.find(2), cache.end()); in TEST()
206 EXPECT_NE(iter = cache.find(3), cache.end()); in TEST()
223 EXPECT_EQ(cache.find(3), cache.end()); in TEST()
[all …]
/aosp12/system/bt/common/
H A Dlru_unittest.cc34 cache.Put(1, 10); in TEST()
104 cache.Put(2, 2000); in TEST()
115 cache.Put(5, 50); in TEST()
116 cache.Put(1, 100); in TEST()
117 cache.Put(1, 1000); in TEST()
131 cache.Put(1, 10); in TEST()
132 cache.Put(2, 20); in TEST()
141 cache.Put(1, 40); in TEST()
148 cache.Put(1, 10); in TEST()
149 cache.Put(2, 20); in TEST()
[all …]
/aosp12/system/core/libutils/
H A DLruCache_test.cpp266 cache.clear(); in TEST_F()
292 cache.clear(); in TEST_F()
324 cache.clear(); in TEST_F()
344 cache.clear(); in TEST_F()
350 cache.put(1, 4); in TEST_F()
351 cache.put(2, 5); in TEST_F()
352 cache.put(3, 6); in TEST_F()
381 cache.put(1, 2); in TEST_F()
393 cache.put(1, 2); in TEST_F()
395 cache.remove(1); in TEST_F()
[all …]
H A DLruCache_fuzz.cpp37 [](FuzzedDataProvider*, FuzzCache* cache) -> void { cache->removeOldest(); }, in __anon7d5aecd40102()
38 [](FuzzedDataProvider*, FuzzCache* cache) -> void { cache->peekOldestValue(); }, in __anon7d5aecd40202()
39 [](FuzzedDataProvider*, FuzzCache* cache) -> void { cache->clear(); }, in __anon7d5aecd40302()
40 [](FuzzedDataProvider*, FuzzCache* cache) -> void { cache->size(); }, in __anon7d5aecd40402()
41 [](FuzzedDataProvider*, FuzzCache* cache) -> void { in __anon7d5aecd40502()
51 cache->put(key, val); in __anon7d5aecd40602()
55 cache->get(key); in __anon7d5aecd40702()
59 cache->remove(key); in __anon7d5aecd40802()
62 cache->setOnEntryRemovedListener(&callback); in __anon7d5aecd40902()
67 FuzzCache cache(MAX_CACHE_ENTRIES); in LLVMFuzzerTestOneInput() local
[all …]
/aosp12/frameworks/base/core/tests/systemproperties/src/android/os/
H A DPropertyInvalidatedCacheTest.java57 TestCache cache = new TestCache(); in testCacheRecompute() local
58 cache.invalidateCache(); in testCacheRecompute()
65 cache.invalidateCache(); in testCacheRecompute()
77 cache.invalidateCache(); in testCacheInitialState()
97 cache.invalidateCache(); in testCacheDisableState()
101 cache.disableSystemWide(); in testCacheDisableState()
121 cache.invalidateCache(); in testRefreshSameObject()
122 String result1 = cache.query(5); in testRefreshSameObject()
143 cache.invalidateCache(); in testRefreshInvalidateRace()
155 cache.invalidateCache(); in testLocalProcessDisable()
[all …]
/aosp12/system/logging/liblog/
H A Dproperties.cpp56 struct cache { struct
62 struct cache cache; member
66 static int check_cache(struct cache* cache) { in check_cache() argument
67 return cache->pinfo && __system_property_serial(cache->pinfo) != cache->serial; in check_cache()
76 if (!cache->cache.pinfo) { in refresh_cache()
77 cache->cache.pinfo = __system_property_find(key); in refresh_cache()
78 if (!cache->cache.pinfo) { in refresh_cache()
82 cache->cache.serial = __system_property_serial(cache->cache.pinfo); in refresh_cache()
83 __system_property_read(cache->cache.pinfo, 0, buf); in refresh_cache()
177 if (cache->c) { in __android_log_level()
[all …]
/aosp12/hardware/qcom/sm8150/data/ipacfg-mgr/ipacm/src/
H A DIPACM_Conntrack_NATApp.cpp47 cache = NULL; in NatApp()
92 if(cache == NULL) in Init()
98 memset(cache, 0, size); in Init()
128 if(cache != NULL) in Init()
130 free(cache); in Init()
217 memset(&cache[cnt], 0, sizeof(cache[cnt])); in AddTable()
293 cache[cnt].rule_id = 0; in DeleteTable()
382 memset(&cache[cnt], 0, sizeof(cache[cnt])); in DeleteEntry()
781 (cache[cnt].private_ip != cache[cnt].public_ip)) in UpdateUDPTimeStamp()
944 memset(&cache[cnt], 0, sizeof(cache[cnt])); in ResetPwrSaveIf()
[all …]
/aosp12/frameworks/base/core/tests/coretests/src/android/content/pm/
H A DRegisteredServicesCacheTest.java84 assertNotEmptyFileCreated(cache, U0); in testGetAllServicesHappyPath()
86 cache = new TestServicesCache(); in testGetAllServicesHappyPath()
94 cache.getAllServices(U0); in testGetAllServicesReplaceUid()
96 cache.invalidateCache(U0); in testGetAllServicesReplaceUid()
97 cache.clearServicesForQuerying(); in testGetAllServicesReplaceUid()
119 cache = new TestServicesCache(); in testGetAllServicesServiceRemoved()
138 cache = new TestServicesCache(); in testGetAllServicesMultiUser()
141 assertNotEmptyFileCreated(cache, U0); in testGetAllServicesMultiUser()
153 cache.onUserRemoved(U1); in testOnRemove()
155 cache.clearServicesForQuerying(); in testOnRemove()
[all …]
/aosp12/hardware/qcom/sdm845/data/ipacfg-mgr/ipacm/src/
H A DIPACM_Conntrack_NATApp.cpp46 cache = NULL; in NatApp()
78 if(cache == NULL) in Init()
84 memset(cache, 0, size); in Init()
114 if(cache != NULL) in Init()
116 free(cache); in Init()
203 memset(&cache[cnt], 0, sizeof(cache[cnt])); in AddTable()
318 memset(&cache[cnt], 0, sizeof(cache[cnt])); in DeleteEntry()
571 (cache[cnt].private_ip != cache[cnt].public_ip)) in UpdateUDPTimeStamp()
672 cache[cnt].rule_hdl = 0; in UpdatePwrSaveIf()
719 memset(&cache[cnt], 0, sizeof(cache[cnt])); in ResetPwrSaveIf()
[all …]
/aosp12/hardware/qcom/data/ipacfg-mgr/msm8998/ipacm/src/
H A DIPACM_Conntrack_NATApp.cpp42 cache = NULL; in NatApp()
74 if(cache == NULL) in Init()
80 memset(cache, 0, size); in Init()
109 free(cache); in Init()
174 memset(&cache[cnt], 0, sizeof(cache[cnt])); in AddTable()
289 memset(&cache[cnt], 0, sizeof(cache[cnt])); in DeleteEntry()
359 cache[cnt].rule_hdl = 0; in AddEntry()
541 (cache[cnt].private_ip != cache[cnt].public_ip)) in UpdateUDPTimeStamp()
642 cache[cnt].rule_hdl = 0; in UpdatePwrSaveIf()
689 memset(&cache[cnt], 0, sizeof(cache[cnt])); in ResetPwrSaveIf()
[all …]
/aosp12/system/extras/simpleperf/
H A DCallChainJoiner_test.cpp32 cache.AddCallChain(tid, tmp_ip, tmp_sp); in JoinCallChain()
37 LRUCache cache(sizeof(CacheNode) * 2, 1); in TEST() local
38 ASSERT_EQ(cache.Stat().max_node_count, 2u); in TEST()
44 ASSERT_EQ(cache.Stat().used_node_count, 2u); in TEST()
52 ASSERT_EQ(cache.Stat().used_node_count, 2u); in TEST()
61 ASSERT_EQ(cache.Stat().used_node_count, 2u); in TEST()
97 LRUCache cache(sizeof(CacheNode) * 2, 1); in TEST() local
103 ASSERT_EQ(cache.Stat().used_node_count, 2u); in TEST()
108 LRUCache cache(sizeof(CacheNode) * 4, 1); in TEST() local
109 ASSERT_EQ(cache.Stat().max_node_count, 4u); in TEST()
[all …]
/aosp12/packages/apps/Gallery/tests/src/com/android/camera/gallery/
H A DLruCacheUnitTests.java12 cache.put(key, value); in testPut()
13 assertEquals(value, cache.get(key)); in testPut()
20 cache.put(key, value); in testTracingInUsedObject()
22 cache.put(i + 10, i * i); in testTracingInUsedObject()
25 assertEquals(value, cache.get(key)); in testTracingInUsedObject()
30 cache.put(0, new Integer(0)); in testLruAlgorithm()
32 cache.put(i + 1, i * i); in testLruAlgorithm()
33 cache.get(0); in testLruAlgorithm()
61 cache.put(0, 0); in testConcurrentAccess()
62 cache.put(1, 1); in testConcurrentAccess()
[all …]
/aosp12/bionic/libc/dns/resolv/
H A Dres_cache.c1317 if (cache) { in _cache_flush_pending_requests_locked()
1418 if (cache) { in _resolv_cache_query_failed()
1446 cache->mru_list.mru_next = cache->mru_list.mru_prev = &cache->mru_list; in _cache_flush_locked()
1475 cache = calloc(sizeof(*cache), 1); in _resolv_cache_create()
1476 if (cache) { in _resolv_cache_create()
1478 cache->entries = calloc(sizeof(*cache->entries), cache->max_entries); in _resolv_cache_create()
1480 cache->mru_list.mru_prev = cache->mru_list.mru_next = &cache->mru_list; in _resolv_cache_create()
1807 if (cache->num_entries >= cache->max_entries) { in _resolv_cache_add()
1809 if (cache->num_entries >= cache->max_entries) { in _resolv_cache_add()
1886 cache_info->cache = cache; in _get_res_cache_for_net_locked()
[all …]
/aosp12/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/
H A DProgramInfoCacheTest.java76 cache.updateFromHalProgramListChunk(chunk); in testUpdateFromHal()
78 assertTrue(cache.isComplete()); in testUpdateFromHal()
89 cache.updateFromHalProgramListChunk(chunk); in testUpdateFromHal()
91 assertFalse(cache.isComplete()); in testUpdateFromHal()
96 ProgramInfoCache cache = new ProgramInfoCache(null, true); in testNullFilter() local
97 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testNullFilter()
106 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testEmptyFilter()
118 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testFilterByType()
129 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testFilterByIdentifier()
137 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testFilterExcludeCategories()
[all …]
/aosp12/art/runtime/verifier/
H A Dreg_type_test.cc70 const RegType& long_lo = cache.LongLo(); in TEST_F()
71 const RegType& long_hi = cache.LongHi(); in TEST_F()
93 const RegType& bool_reg_type = cache.Boolean(); in TEST_F()
126 const RegType& byte_reg_type = cache.Byte(); in TEST_F()
159 const RegType& char_reg_type = cache.Char(); in TEST_F()
192 const RegType& short_reg_type = cache.Short(); in TEST_F()
225 const RegType& int_reg_type = cache.Integer(); in TEST_F()
724 const RegType& conflict = cache.Conflict(); in TEST_F()
725 const RegType& zero = cache.Zero(); in TEST_F()
726 const RegType& null = cache.Null(); in TEST_F()
[all …]
/aosp12/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
H A DMediaCacheManager.java50 MediaCache<?> cache = mCaches.get(id); in getOrCreateMediaCacheById() local
51 if (cache == null) { in getOrCreateMediaCacheById()
52 cache = createMediaCacheById(id); in getOrCreateMediaCacheById()
53 if (cache != null) { in getOrCreateMediaCacheById()
54 mCaches.put(id, cache); in getOrCreateMediaCacheById()
57 return cache; in getOrCreateMediaCacheById()
61 final MediaCache<?> cache = getOrCreateMediaCacheById(cacheId); in getOrCreateBitmapPoolForCache() local
62 if (cache != null && cache instanceof PoolableImageCache) { in getOrCreateBitmapPoolForCache()
63 return ((PoolableImageCache) cache).asReusableBitmapPool(); in getOrCreateBitmapPoolForCache()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/
H A DCustomIconCache.kt36 private val cache: MutableMap<String, Icon> = LinkedHashMap()
49 synchronized(cache) {
51 cache.put(controlId, icon)
53 cache.remove(controlId)
66 return synchronized(cache) {
67 cache.get(controlId)
72 synchronized(cache) {
73 cache.clear()
/aosp12/frameworks/native/cmds/installd/
H A Dotapreopt.rc2 # into the dalvik-cache (relabeling them).
5 # The dalvik-cache was not moved itself, so as to restrict the rights of otapreopt_slot.
8 …/data/dalvik-cache/arm /data/dalvik-cache/arm64 /data/dalvik-cache/mips /data/dalvik-cache/mips64 …
H A Dotapreopt_slot.sh23 if test -d /data/ota/$SLOT_SUFFIX/dalvik-cache ; then
25 OLD_SIZE=$(du -h -s /data/dalvik-cache)
26 rm -rf /data/dalvik-cache/*
27 NEW_SIZE=$(du -h -s /data/ota/$SLOT_SUFFIX/dalvik-cache)
28 mv /data/ota/$SLOT_SUFFIX/dalvik-cache/* /data/dalvik-cache/
29 rmdir /data/ota/$SLOT_SUFFIX/dalvik-cache
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/
H A DCacheProcessing.java37 Bitmap cache; field in CacheProcessing.CacheStep
122 environment.cache(source); in apply()
169 environment.cache(cacheStep.cache); in process()
200 environment.cache(prev); in process()
224 if (step.cache == null) { in process()
231 step.cache = cacheBitmap; in process()
235 environment.cache(originalCopy); in process()
245 Bitmap bitmap = currentStep.cache; in process()
246 currentStep.cache = null; in process()
247 environment.cache(bitmap); in process()
[all …]
/aosp12/packages/modules/DnsResolver/
H A Dres_cache.cpp1110 if (cache) { in _resolv_cache_query_failed()
1165 cache->num_entries += 1; in _cache_add_p()
1207 for (e = cache->mru_list.mru_next; e != &cache->mru_list;) { in _cache_remove_expired()
1253 if (cache == nullptr) { in resolv_cache_lookup()
1280 if (!cache) { in resolv_cache_lookup()
1332 Cache* cache = NULL; in resolv_cache_add() local
1344 if (cache == nullptr) { in resolv_cache_add()
1401 Cache* cache = nullptr; in resolv_gethostbyaddr_from_cache() local
1415 if (cache == nullptr) { in resolv_gethostbyaddr_from_cache()
1892 Cache* cache; in resolv_cache_get_expiration() local
[all …]
/aosp12/frameworks/base/core/java/android/net/
H A DSSLSessionCache.java59 public static void install(SSLSessionCache cache, SSLContext context) { in install() argument
63 cache == null ? null : cache.mSessionCache); in install()
76 public SSLSessionCache(Object cache) { in SSLSessionCache() argument
77 mSessionCache = (SSLClientSessionCache) cache; in SSLSessionCache()
100 SSLClientSessionCache cache = null; in SSLSessionCache() local
102 cache = FileClientSessionCache.usingDirectory(dir); in SSLSessionCache()
106 mSessionCache = cache; in SSLSessionCache()
/aosp12/art/test/717-integer-value-of/src/
H A DMain.java44 Integer[] cache = (Integer[]) cacheField.get(integerCacheClass); in testValueOfArg()
45 Integer[] alt_cache = new Integer[cache.length]; in testValueOfArg()
46 System.arraycopy(cache, 0, alt_cache, 0, cache.length); in testValueOfArg()
54 cacheField.set(integerCacheClass, cache); in testValueOfArg()
94 Integer[] cache = (Integer[]) cacheField.get(integerCacheClass); in testValueOfConst() local
96 Integer old42 = cache[42 - low]; in testValueOfConst()
97 cache[42 - low] = new Integer(42); in testValueOfConst()
105 cache[42 - low] = old42; in testValueOfConst()

12345678910>>...30