1 #include <sys/types.h> 2 #include <sys/malloc.h> 3 4 /* 5 * Space allocation and freeing routines for use by zlib routines. 6 */ 7 void * 8 zcalloc(void *notused, u_int items, u_int size) 9 { 10 return mallocarray(items, size, M_DEVBUF, M_NOWAIT); 11 } 12 13 void 14 zcfree(void *notused, void *ptr) 15 { 16 free(ptr, M_DEVBUF, 0); 17 } 18