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

Function bt_alloc

freebsd/kern/subr_vmem.c:321–333  ·  view source on GitHub ↗

* Pop a tag off of the freetag stack. */

Source from the content-addressed store, hash-verified

319 * Pop a tag off of the freetag stack.
320 */
321static bt_t *
322bt_alloc(vmem_t *vm)
323{
324 bt_t *bt;
325
326 VMEM_ASSERT_LOCKED(vm);
327 bt = LIST_FIRST(&vm->vm_freetags);
328 MPASS(bt != NULL);
329 LIST_REMOVE(bt, bt_freelist);
330 vm->vm_nfreetags--;
331
332 return bt;
333}
334
335/*
336 * Trim the per-vmem free list. Returns with the lock released to

Callers 2

vmem_add1Function · 0.85
vmem_clipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected