MCPcopy Create free account
hub / github.com/F-Stack/f-stack / uma_startup2

Function uma_startup2

freebsd/vm/uma_core.c:2972–2992  ·  view source on GitHub ↗

* Advertise the availability of normal kva allocations and switch to * the default back-end allocator. Marks the KVA we consumed on startup * as used in the map. */

Source from the content-addressed store, hash-verified

2970 * as used in the map.
2971 */
2972void
2973uma_startup2(void)
2974{
2975#ifndef FSTACK
2976 if (bootstart != bootmem) {
2977 vm_map_lock(kernel_map);
2978 (void)vm_map_insert(kernel_map, NULL, 0, bootstart, bootmem,
2979 VM_PROT_RW, VM_PROT_RW, MAP_NOFAULT);
2980 vm_map_unlock(kernel_map);
2981 }
2982
2983#ifndef UMA_MD_SMALL_ALLOC
2984 /* Set up radix zone to use noobj_alloc. */
2985 vm_radix_reserve_kva();
2986#endif
2987#endif
2988
2989 booted = BOOT_KVA;
2990 zone_foreach_unlocked(zone_kva_available, NULL);
2991 bucket_enable();
2992}
2993
2994/*
2995 * Allocate counters as early as possible so that boot-time allocations are

Callers 2

kmem_initFunction · 0.85
ff_freebsd_initFunction · 0.85

Calls 4

vm_map_insertFunction · 0.85
vm_radix_reserve_kvaFunction · 0.85
zone_foreach_unlockedFunction · 0.85
bucket_enableFunction · 0.85

Tested by

no test coverage detected