From a7aebb6dac3287374721dd2101a4584f12c63c82 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 29 Aug 2003 19:16:13 +0000 Subject: Add DRM(calloc), which is convenient, used by the new sis code, and takes advantage of M_ZERO on BSDs. --- bsd/drm_memory.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bsd/drm_memory.h') diff --git a/bsd/drm_memory.h b/bsd/drm_memory.h index edd9ffa6..dc0d3753 100644 --- a/bsd/drm_memory.h +++ b/bsd/drm_memory.h @@ -58,6 +58,11 @@ void *DRM(alloc)(size_t size, int area) return malloc(size, DRM(M_DRM), M_NOWAIT); } +void *DRM(calloc)(size_t nmemb, size_t size, int area) +{ + return malloc(size * nmemb, DRM(M_DRM), M_NOWAIT | M_ZERO); +} + void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size, int area) { void *pt; -- cgit v1.2.3