xref: /openbsd-src/sys/lib/libz/zopenbsd.c (revision d0fc3bb68efd6c434b4053cd7adb29023cbec341)
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