summaryrefslogtreecommitdiff
path: root/bsd-core/drm_memory.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-08-29 19:16:13 +0000
committerEric Anholt <anholt@freebsd.org>2003-08-29 19:16:13 +0000
commita7aebb6dac3287374721dd2101a4584f12c63c82 (patch)
tree7fa20b6fd3b750d18f0ed5709e2a8458ff4a4ab6 /bsd-core/drm_memory.c
parentdb781291164dfa10538776748df7af901c6b20a2 (diff)
Add DRM(calloc), which is convenient, used by the new sis code, and takes
advantage of M_ZERO on BSDs.
Diffstat (limited to 'bsd-core/drm_memory.c')
-rw-r--r--bsd-core/drm_memory.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bsd-core/drm_memory.c b/bsd-core/drm_memory.c
index edd9ffa6..dc0d3753 100644
--- a/bsd-core/drm_memory.c
+++ b/bsd-core/drm_memory.c
@@ -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;