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

Function kobj_create

freebsd/kern/subr_kobj.c:294–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294kobj_t
295kobj_create(kobj_class_t cls, struct malloc_type *mtype, int mflags)
296{
297 kobj_t obj;
298
299 obj = malloc(cls->size, mtype, mflags | M_ZERO);
300 if (obj == NULL)
301 return (NULL);
302 if (kobj_init1(obj, cls, mflags) != 0) {
303 free(obj, mtype);
304 return (NULL);
305 }
306 return (obj);
307}
308
309void
310kobj_init(kobj_t obj, kobj_class_t cls)

Callers 4

iconv_xlat_openFunction · 0.85
iconv_ucs_openFunction · 0.85
iconv_xlat16_openFunction · 0.85
linker_make_fileFunction · 0.85

Calls 3

mallocFunction · 0.85
kobj_init1Function · 0.85
freeFunction · 0.70

Tested by

no test coverage detected