summaryrefslogtreecommitdiff
path: root/sys/lib/libz/zopenbsd.c
blob: b74c4bc6bed8ef901330dff953a42ce837e2db4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <sys/types.h>
#include <sys/malloc.h>
#include <lib/libz/zutil.h>

/*
 * Space allocation and freeing routines for use by zlib routines.
 */
void *
zcalloc(notused, items, size)
    void *notused;
    u_int items, size;
{
    void *ptr;

    ptr = malloc(items * size, M_DEVBUF, M_NOWAIT);
    return ptr;
}

void
zcfree(notused, ptr)
    void *notused;
    void *ptr;
{
    free(ptr, M_DEVBUF);
}