Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_pcpu.c
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | pcpu_zone_64 = uma_zcreate("64 pcpu", sizeof(uint64_t), | ||||
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); | NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); | ||||
if (sizeof(uint64_t) == sizeof(void *)) | if (sizeof(uint64_t) == sizeof(void *)) | ||||
pcpu_zone_ptr = pcpu_zone_64; | pcpu_zone_ptr = pcpu_zone_64; | ||||
else | else | ||||
pcpu_zone_ptr = uma_zcreate("ptr pcpu", sizeof(void *), | pcpu_zone_ptr = uma_zcreate("ptr pcpu", sizeof(void *), | ||||
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); | NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); | ||||
} | } | ||||
SYSINIT(pcpu_zones, SI_SUB_KMEM, SI_ORDER_ANY, pcpu_zones_startup, NULL); | SYSINIT(pcpu_zones, SI_SUB_VM, SI_ORDER_ANY, pcpu_zones_startup, NULL); | ||||
/* | /* | ||||
* First-fit extent based allocator for allocating space in the per-cpu | * First-fit extent based allocator for allocating space in the per-cpu | ||||
* region reserved for modules. This is only intended for use by the | * region reserved for modules. This is only intended for use by the | ||||
* kernel linkers to place module linker sets. | * kernel linkers to place module linker sets. | ||||
*/ | */ | ||||
void * | void * | ||||
dpcpu_alloc(int size) | dpcpu_alloc(int size) | ||||
▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines |