template <typename T, typename Allocator>
class ObjectCache
Defined at line 718 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
Specialization of ObjectCache for the per-CPU slab cache variant. Operations
serialize on per-CPU object cache locks.
Public Methods
void ObjectCache<T, Option::PerCpu, Allocator> ()
ObjectCache is default constructible in the empty state.
Defined at line 729 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
void ObjectCache<T, Option::PerCpu, Allocator> (const ObjectCache<T, Option::PerCpu, Allocator> & )
ObjectCache is not copiable.
Defined at line 732 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
ObjectCache<T, Option::PerCpu, Allocator> & operator= (const ObjectCache<T, Option::PerCpu, Allocator> & )
Defined at line 733 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
void ObjectCache<T, Option::PerCpu, Allocator> (ObjectCache<T, Option::PerCpu, Allocator> && )
ObjectCache is movable.
Defined at line 736 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
ObjectCache<T, Option::PerCpu, Allocator> & operator= (ObjectCache<T, Option::PerCpu, Allocator> && )
Defined at line 737 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
template <typename... Args>
EnableIfAllocatorConstructible<zx::result<ObjectCache<T, Option::PerCpu, Allocator>>, Args...> Create (size_t reserve_slabs, Args &&... args)
Creates a per-CPU ObjectCache with the given slab reservation value and
allocator args. The reserve value applies to each per-CPU cache
independently. Reserve slabs are not immediately allocated.
Defined at line 743 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
template <typename... Args>
EnableIfConstructible<zx::result<PtrType>, Args...> Allocate (Args &&... args)
Allocates an instance of T from a slab, using the object cache of the
current CPU, and constructs it with the given arguments. Returns a pointer
to the constructed object as a unique pointer. If the object is ref counted
it is not yet adopted.
Defined at line 766 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
size_t slab_count ()
Defined at line 776 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h