template <typename T, typename Allocator>
class ObjectCache
Defined at line 211 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
Specialization of ObjectCache for the single slab cache variant. Operations
serialize on the main object cache lock, regardless of CPU.
Public Methods
template <typename... Args, typename = EnableIfAllocatorConstructible<Args...>>
void ObjectCache<T, Option::Single, Allocator> (size_t reserve_slabs, Args &&... args)
Constructs an ObjectCache with the given slab reservation value. Reserve
slabs are not immediately allocated.
Defined at line 235 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
void ~ObjectCache<T, Option::Single, Allocator> ()
Defined at line 241 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
void ObjectCache<T, Option::Single, Allocator> (const ObjectCache<T, Option::Single, Allocator> & )
ObjectCache is not copiable.
Defined at line 287 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
ObjectCache<T, Option::Single, Allocator> & operator= (const ObjectCache<T, Option::Single, Allocator> & )
Defined at line 288 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
void ObjectCache<T, Option::Single, Allocator> (ObjectCache<T, Option::Single, Allocator> && other)
ObjectCache is not movable.
Defined at line 291 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
ObjectCache<T, Option::Single, Allocator> & operator= (ObjectCache<T, Option::Single, Allocator> && other)
Defined at line 292 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 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 300 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
size_t slab_count ()
Defined at line 323 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
size_t objects_per_slab ()
Defined at line 328 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
size_t slab_control_size ()
Defined at line 329 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
size_t entry_size ()
Defined at line 330 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
Allocator & allocator ()
Defined at line 332 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
const Allocator & allocator ()
Defined at line 333 of file ../../zircon/kernel/lib/object_cache/include/lib/object_cache.h
Friends
template <typename, typename>
class Deletable
template <typenametypename>
class Deleter