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

Function mb_zinit_pack

freebsd/kern/kern_mbuf.c:739–753  ·  view source on GitHub ↗

* The Packet secondary zone's init routine, executed on the * object's transition from mbuf keg slab to zone cache. */

Source from the content-addressed store, hash-verified

737 * object's transition from mbuf keg slab to zone cache.
738 */
739static int
740mb_zinit_pack(void *mem, int size, int how)
741{
742 struct mbuf *m;
743
744 m = (struct mbuf *)mem; /* m is virgin. */
745 if (uma_zalloc_arg(zone_clust, m, how) == NULL ||
746 m->m_ext.ext_buf == NULL)
747 return (ENOMEM);
748 m->m_ext.ext_type = EXT_PACKET; /* Override. */
749#ifdef INVARIANTS
750 trash_init(m->m_ext.ext_buf, MCLBYTES, how);
751#endif
752 return (0);
753}
754
755/*
756 * The Packet secondary zone's fini routine, executed on the

Callers

nothing calls this directly

Calls 2

uma_zalloc_argFunction · 0.85
trash_initFunction · 0.85

Tested by

no test coverage detected