Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/uma.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
#define UMA_SMALLEST_UNIT (PAGE_SIZE / 256) /* Smallest item allocated */ | #define UMA_SMALLEST_UNIT (PAGE_SIZE / 256) /* Smallest item allocated */ | ||||
/* Types and type defs */ | /* Types and type defs */ | ||||
struct uma_zone; | struct uma_zone; | ||||
/* Opaque type used as a handle to the zone */ | /* Opaque type used as a handle to the zone */ | ||||
typedef struct uma_zone * uma_zone_t; | typedef struct uma_zone * uma_zone_t; | ||||
void zone_drain(uma_zone_t); | |||||
/* | /* | ||||
* Item constructor | * Item constructor | ||||
* | * | ||||
* Arguments: | * Arguments: | ||||
* item A pointer to the memory which has been allocated. | * item A pointer to the memory which has been allocated. | ||||
* arg The arg field passed to uma_zalloc_arg | * arg The arg field passed to uma_zalloc_arg | ||||
* size The size of the allocated item | * size The size of the allocated item | ||||
* flags See zalloc flags | * flags See zalloc flags | ||||
▲ Show 20 Lines • Show All 370 Lines • ▼ Show 20 Lines | |||||
* pflag The flags for the slab. See UMA_SLAB_* below. | * pflag The flags for the slab. See UMA_SLAB_* below. | ||||
* | * | ||||
* Returns: | * Returns: | ||||
* None | * None | ||||
*/ | */ | ||||
typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag); | typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag); | ||||
/* | /* | ||||
* Reclaims unused memory for all zones | * Reclaims unused memory | ||||
* | * | ||||
* Arguments: | * Arguments: | ||||
* None | * req Reclamation request type. | ||||
* Returns: | * Returns: | ||||
* None | * None | ||||
* | |||||
* This should only be called by the page out daemon. | |||||
*/ | */ | ||||
#define UMA_RECLAIM_DRAIN 1 /* release bucket cache */ | |||||
void uma_reclaim(void); | #define UMA_RECLAIM_DRAIN_CPU 2 /* release bucket and per-CPU caches */ | ||||
#define UMA_RECLAIM_TRIM 3 /* trim bucket cache to WSS */ | |||||
void uma_reclaim(int req); | |||||
void uma_zone_reclaim(uma_zone_t, int req); | |||||
/* | /* | ||||
* Sets the alignment mask to be used for all zones requesting cache | * Sets the alignment mask to be used for all zones requesting cache | ||||
* alignment. Should be called by MD boot code prior to starting VM/UMA. | * alignment. Should be called by MD boot code prior to starting VM/UMA. | ||||
* | * | ||||
* Arguments: | * Arguments: | ||||
* align The alignment mask | * align The alignment mask | ||||
* | * | ||||
▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines |