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

Function vm_thread_dispose

freebsd/vm/vm_glue.c:394–408  ·  view source on GitHub ↗

* Dispose of a thread's kernel stack. */

Source from the content-addressed store, hash-verified

392 * Dispose of a thread's kernel stack.
393 */
394void
395vm_thread_dispose(struct thread *td)
396{
397 vm_offset_t ks;
398 int pages;
399
400 pages = td->td_kstack_pages;
401 ks = td->td_kstack;
402 td->td_kstack = 0;
403 td->td_kstack_pages = 0;
404 if (pages == kstack_pages)
405 uma_zfree(kstack_cache, (void *)ks);
406 else
407 vm_thread_stack_dispose(ks, pages);
408}
409
410/*
411 * Allocate physical pages, following the specified NUMA policy, to back a

Callers 2

fork1Function · 0.85
thread_free_batchedFunction · 0.85

Calls 2

vm_thread_stack_disposeFunction · 0.85
uma_zfreeFunction · 0.70

Tested by

no test coverage detected