xref: /openbsd/sys/lib/libz/zopenbsd.c (revision a6445c1d)
1 #include <sys/types.h>
2 #include <sys/malloc.h>
3 #include <lib/libz/zutil.h>
4 
5 /*
6  * Space allocation and freeing routines for use by zlib routines.
7  */
8 void *
9 zcalloc(notused, items, size)
10     void *notused;
11     u_int items, size;
12 {
13     return mallocarray(items, size, M_DEVBUF, M_NOWAIT);
14 }
15 
16 void
17 zcfree(notused, ptr)
18     void *notused;
19     void *ptr;
20 {
21     free(ptr, M_DEVBUF, 0);
22 }
23