Lines Matching refs:hMemCache
79 RTMEMCACHE hMemCache;
80 RTTESTI_CHECK_RC_RETV(RTMemCacheCreate(&hMemCache, 256, cObjects, 32, NULL, NULL, NULL, 0 /*fFlags*/), VINF_SUCCESS);
81 RTTESTI_CHECK_RETV(hMemCache != NIL_RTMEMCACHE);
85 RTTESTI_CHECK_RC_RETV(RTMemCacheAllocEx(hMemCache, &pv), VINF_SUCCESS);
88 RTMemCacheFree(hMemCache, pv);
90 RTTESTI_CHECK((pv = RTMemCacheAlloc(hMemCache)) != NULL);
91 RTMemCacheFree(hMemCache, pv);
101 RTTESTI_CHECK_RC(RTMemCacheAllocEx(hMemCache, &apv[i]), VINF_SUCCESS);
106 RTTESTI_CHECK_RC(rc = RTMemCacheAllocEx(hMemCache, &pv), VERR_MEM_CACHE_MAX_SIZE);
108 RTMemCacheFree(hMemCache, pv);
110 RTTESTI_CHECK((pv = RTMemCacheAlloc(hMemCache)) == NULL);
111 RTMemCacheFree(hMemCache, pv);
116 RTMemCacheFree(hMemCache, apv[i]);
118 RTTESTI_CHECK((pv = RTMemCacheAlloc(hMemCache)) != NULL);
119 RTMemCacheFree(hMemCache, pv);
124 RTTESTI_CHECK_RC(RTMemCacheDestroy(hMemCache), VINF_SUCCESS);
131 static DECLCALLBACK(int) tst2Ctor(RTMEMCACHE hMemCache, void *pvObj, void *pvUser)
133 RTTESTI_CHECK(hMemCache == g_hMemCache);
145 static DECLCALLBACK(void) tst2Dtor(RTMEMCACHE hMemCache, void *pvObj, void *pvUser)