Searched refs:test_cache (Results 1 – 2 of 2) sorted by relevance
/linux/mm/kfence/ |
H A D | kfence_test.c | 183 static struct kmem_cache *test_cache; variable 198 test_cache = kmem_cache_create("test", size, 1, flags, ctor); in setup_test_cache() 199 KUNIT_ASSERT_TRUE_MSG(test, test_cache, "could not create cache"); in setup_test_cache() 206 if (!test_cache) in test_cache_destroy() 209 kmem_cache_destroy(test_cache); in test_cache_destroy() 210 test_cache = NULL; in test_cache_destroy() 223 if (test_cache) in test_free() 224 kmem_cache_free(test_cache, ptr); in test_free() 242 * current test_cache if set up. 266 policy_name, !!test_cache); in test_alloc() [all...] |
/linux/tools/testing/shared/ |
H A D | linux.c | 264 static struct kmem_cache *test_cache, *test_cache2; in test_kmem_cache_bulk() local 270 test_cache = kmem_cache_create("test_cache", 256, 0, SLAB_PANIC, NULL); in test_kmem_cache_bulk() 273 list[i] = kmem_cache_alloc(test_cache, __GFP_DIRECT_RECLAIM); in test_kmem_cache_bulk() 276 kmem_cache_free(test_cache, list[i]); in test_kmem_cache_bulk() 277 assert(test_cache->nr_objs == 5); in test_kmem_cache_bulk() 279 kmem_cache_alloc_bulk(test_cache, __GFP_DIRECT_RECLAIM, 5, list); in test_kmem_cache_bulk() 280 kmem_cache_free_bulk(test_cache, 5, list); in test_kmem_cache_bulk() 283 list[i] = kmem_cache_alloc(test_cache, __GFP_DIRECT_RECLAIM); in test_kmem_cache_bulk() 286 kmem_cache_free(test_cache, list[i]); in test_kmem_cache_bulk() 289 assert(test_cache->nr_objs == 11); in test_kmem_cache_bulk()
|