Lines Matching refs:cache

15 // TODO this value should be dynamically tuned per cache.
39 MallocBackend::AllocatePages(BaseCache *cache, AllocationID *id, void **pages,
56 MallocBackend::FreePages(BaseCache *cache, void *pages)
63 AreaBackend::AllocatePages(BaseCache *cache, area_id *id, void **pages,
69 area_id areaId = create_area(cache->Name(), pages, B_ANY_ADDRESS, //B_ANY_KERNEL_ADDRESS,
81 AreaBackend::FreePages(BaseCache *cache, area_id area)
419 object_cache_alloc(object_cache_t cache)
421 return ((MallocLocalCache *)cache)->Alloc(0);
426 object_cache_alloc_etc(object_cache_t cache, uint32_t flags)
428 return ((MallocLocalCache *)cache)->Alloc(flags);
433 object_cache_free(object_cache_t cache, void *object)
435 ((MallocLocalCache *)cache)->Free(object);
440 object_cache_destroy(object_cache_t cache)
442 delete (MallocLocalCache *)cache;
448 MallocLocalCache cache("foobar", sizeof(int), 0, NULL, NULL, NULL);
454 buf[i] = cache.Alloc(0);
457 cache.Free(buf[i]);
459 cache.Destroy();
464 TypedCache<int, MallocBackend> cache("int cache", 0);
470 buf[i] = cache.Alloc(0);
473 cache.Free(buf[i]);
478 Cache<HashCacheStrategy<AreaBackend> > cache("512byte hash cache", 512, 0, NULL,
485 buf[i] = cache.AllocateObject(0);
488 cache.ReturnObject(buf[i]);
493 LocalCache<MallocHashCache> cache("foobar", 512, 0, NULL, NULL, NULL);
499 buf[i] = cache.Alloc(0);
502 cache.Free(buf[i]);
504 cache.Destroy();
509 object_cache_t cache = object_cache_create("foobar", 16, 0,
516 buf[i] = object_cache_alloc(cache);
519 object_cache_free(cache, buf[i]);
521 object_cache_destroy(cache);