Lines Matching refs:hdr
182 struct mhdr *hdr;
183 size_t memsize = sizeof (*hdr) + size;
188 hdr = (void *)kalloc_noblock(memsize);
190 hdr = (void *)kalloc(memsize);
191 if (hdr == NULL)
194 if (hdr == NULL)
196 hdr->mh_size = memsize;
197 hdr->mh_type = type;
198 hdr->mh_magic = AUDIT_MHMAGIC;
200 memset(hdr->mh_data, 0, size);
211 return (hdr->mh_data);
224 struct mhdr *hdr;
228 hdr = addr; hdr--;
230 KASSERT(hdr->mh_magic == AUDIT_MHMAGIC,
231 ("_audit_free(): hdr->mh_magic != AUDIT_MHMAGIC"));
235 OSAddAtomic64(-hdr->mh_size, &type->mt_size);
239 kfree(hdr, hdr->mh_size);