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

Function vmspace_dofree

freebsd/vm/vm_map.c:364–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362#endif
363
364static inline void
365vmspace_dofree(struct vmspace *vm)
366{
367
368 CTR1(KTR_VM, "vmspace_free: %p", vm);
369
370 /*
371 * Make sure any SysV shm is freed, it might not have been in
372 * exit1().
373 */
374 shmexit(vm);
375
376 /*
377 * Lock the map, to wait out all other references to it.
378 * Delete all of the mappings and pages they hold, then call
379 * the pmap module to reclaim anything left.
380 */
381 (void)vm_map_remove(&vm->vm_map, vm_map_min(&vm->vm_map),
382 vm_map_max(&vm->vm_map));
383
384 pmap_release(vmspace_pmap(vm));
385 vm->vm_map.pmap = NULL;
386 uma_zfree(vmspace_zone, vm);
387}
388
389void
390vmspace_free(struct vmspace *vm)

Callers 2

vmspace_freeFunction · 0.85
vmspace_exitFunction · 0.85

Calls 7

shmexitFunction · 0.85
vm_map_removeFunction · 0.85
vm_map_minFunction · 0.85
vm_map_maxFunction · 0.85
vmspace_pmapFunction · 0.85
uma_zfreeFunction · 0.70
pmap_releaseFunction · 0.50

Tested by

no test coverage detected