Lines Matching full:zone

49 /* Opaque type used as a handle to the zone */
102 * The initializer is called when the memory is cached in the uma zone.
113 * zone's cache.
120 * This routine is called when memory leaves a zone and is returned to the
126 * Import new memory into a cache zone.
132 * Free memory from a cache zone.
158 * Create a new uma zone
161 * name The text name of the zone for debugging and stats. This memory
162 * should not be freed until the zone has been deallocated.
171 * flags A set of parameters that control the behavior of the zone.
182 * Create a secondary uma zone
185 * name The text name of the zone for debugging and stats. This memory
186 * should not be freed until the zone has been deallocated.
190 * as the object passes from the Keg's slab to the Zone's cache.
192 * as the object passes from the Zone's cache to the Keg's slab.
197 * when creating a primary zone. These zinit/zfini are called
198 * on the TRANSITION from keg to zone (and vice-versa). Once
199 * these are set, the primary zone may alter its init/fini
202 * zinit/zfini (unset by default for primary zone) with
205 * primary A reference to this zone's Primary Zone which contains the
206 * backing Keg for the Secondary Zone being added.
252 #define UMA_ZONE_SECONDARY 0x0200 /* Zone is a Secondary Zone */
255 #define UMA_ZONE_NOTRIM 0x1000 /* Don't trim this zone */
263 * Zone's pages will not be included in
277 * zone. To share contexts see
290 * These flags are shared between the keg and zone. Some are determined
313 * Destroys an empty uma zone. If the zone is not empty uma complains loudly.
316 * zone The zone we want to destroy.
319 void uma_zdestroy(uma_zone_t zone);
322 * Allocates an item out of a zone
325 * zone The zone we are allocating from
330 * A non-null pointer to an initialized element from the zone is
332 * may be returned if the zone is empty or the ctor failed.
335 void *uma_zalloc_arg(uma_zone_t zone, void *arg, int flags);
338 void *uma_zalloc_pcpu_arg(uma_zone_t zone, void *arg, int flags);
341 void *uma_zalloc_smr(uma_zone_t zone, int flags);
349 * zone The zone we are allocating from
354 void *uma_zalloc_domain(uma_zone_t zone, void *arg, int domain, int flags);
357 * Allocates an item out of a zone without supplying an argument
362 static __inline void *uma_zalloc(uma_zone_t zone, int flags);
363 static __inline void *uma_zalloc_pcpu(uma_zone_t zone, int flags);
366 uma_zalloc(uma_zone_t zone, int flags) in uma_zalloc() argument
368 return uma_zalloc_arg(zone, NULL, flags); in uma_zalloc()
372 uma_zalloc_pcpu(uma_zone_t zone, int flags) in uma_zalloc_pcpu() argument
374 return uma_zalloc_pcpu_arg(zone, NULL, flags); in uma_zalloc_pcpu()
378 * Frees an item back into the specified zone.
381 * zone The zone the item was originally allocated out of.
389 void uma_zfree_arg(uma_zone_t zone, void *item, void *arg);
392 void uma_zfree_pcpu_arg(uma_zone_t zone, void *item, void *arg);
395 void uma_zfree_smr(uma_zone_t zone, void *item);
398 * Frees an item back to a zone without supplying an argument
403 static __inline void uma_zfree(uma_zone_t zone, void *item);
404 static __inline void uma_zfree_pcpu(uma_zone_t zone, void *item);
407 uma_zfree(uma_zone_t zone, void *item) in uma_zfree() argument
409 uma_zfree_arg(zone, item, NULL); in uma_zfree()
413 uma_zfree_pcpu(uma_zone_t zone, void *item) in uma_zfree_pcpu() argument
415 uma_zfree_pcpu_arg(zone, item, NULL); in uma_zfree_pcpu()
419 * Wait until the specified zone can allocate an item.
421 void uma_zwait(uma_zone_t zone);
427 * zone The zone that is requesting pages.
437 typedef void *(*uma_alloc)(uma_zone_t zone, vm_size_t size, int domain,
489 void uma_zone_reserve(uma_zone_t zone, int nitems);
492 * Reserves the maximum KVA space required by the zone and configures the zone
497 * zone The zone to update.
505 * When the machine supports a direct map and the zone's items are smaller
506 * than a page, the zone will use the direct map instead of allocating KVA
509 int uma_zone_reserve_kva(uma_zone_t zone, int nitems);
512 * Sets an upper limit on the number of items allocated from a zone
515 * zone The zone to limit
521 int uma_zone_set_max(uma_zone_t zone, int nitems);
524 * Sets an upper limit on the number of items allowed in zone's caches
527 * zone The zone to limit
530 void uma_zone_set_maxcache(uma_zone_t zone, int nitems);
533 * Obtains the effective limit on the number of items in a zone
536 * zone The zone to obtain the effective limit from
540 * int The effective limit of the zone
542 int uma_zone_get_max(uma_zone_t zone);
548 * zone The zone we will warn about
554 void uma_zone_set_warning(uma_zone_t zone, const char *warning);
560 * zone The zone to which this applies
567 void uma_zone_set_maxaction(uma_zone_t zone, uma_maxaction_t);
570 * Obtains the approximate current number of items allocated from a zone
573 * zone The zone to obtain the current allocation count from
576 * int The approximate current number of items allocated from the zone
578 int uma_zone_get_cur(uma_zone_t zone);
584 * the specified zone's backing keg. These should probably not
586 * immediately upon zone creation.
588 void uma_zone_set_init(uma_zone_t zone, uma_init uminit);
589 void uma_zone_set_fini(uma_zone_t zone, uma_fini fini);
595 * specified Zone's bucket cache. These should probably not
597 * immediately upon zone creation.
599 void uma_zone_set_zinit(uma_zone_t zone, uma_init zinit);
600 void uma_zone_set_zfini(uma_zone_t zone, uma_fini zfini);
603 * Replaces the standard backend allocator for this zone.
606 * zone The zone whose backend allocator is being changed.
615 * zone flag.
618 void uma_zone_set_allocf(uma_zone_t zone, uma_alloc allocf);
624 * zone The zone that intends to use this free routine.
631 void uma_zone_set_freef(uma_zone_t zone, uma_free freef);
634 * Associate a zone with a smr context that is allocated after creation
637 void uma_zone_set_smr(uma_zone_t zone, smr_t smr);
642 smr_t uma_zone_get_smr(uma_zone_t zone);
653 * Used to pre-fill a zone with some number of items
656 * zone The zone to fill
664 void uma_prealloc(uma_zone_t zone, int itemcnt);
667 * Used to determine if a fixed-size zone is exhausted.
670 * zone The zone to check
673 * Non-zero if zone is exhausted.
675 int uma_zone_exhausted(uma_zone_t zone);
678 * Returns the bytes of memory consumed by the zone.
680 size_t uma_zone_memory(uma_zone_t zone);
708 * Static per-zone data, some extracted from the supporting keg.
718 * Current dynamic zone/keg-derived statistics.
722 uint32_t uth_zone_free; /* Zone: items free. */
723 uint32_t uth_bucketsize; /* Zone: desired bucket size. */
724 uint32_t uth_zone_flags; /* Zone: flags. */
725 uint64_t uth_allocs; /* Zone: number of allocations. */
726 uint64_t uth_frees; /* Zone: number of frees. */
727 uint64_t uth_fails; /* Zone: number of alloc failures. */
728 uint64_t uth_sleeps; /* Zone: number of alloc sleeps. */
729 uint64_t uth_xdomain; /* Zone: Number of cross domain frees. */