zopenbsd.c 355 B

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