| 292 | } |
| 293 | |
| 294 | kobj_t |
| 295 | kobj_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 | |
| 309 | void |
| 310 | kobj_init(kobj_t obj, kobj_class_t cls) |
no test coverage detected