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