diff options
Diffstat (limited to 'linux/drm_memory_debug.h')
-rw-r--r-- | linux/drm_memory_debug.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/linux/drm_memory_debug.h b/linux/drm_memory_debug.h index 3ef2a05c..fae419ec 100644 --- a/linux/drm_memory_debug.h +++ b/linux/drm_memory_debug.h @@ -167,6 +167,17 @@ void *DRM(alloc)(size_t size, int area) return pt; } +void *DRM(calloc)(size_t size, size_t nmemb, int area) +{ + void *addr; + + addr = DRM(alloc)(nmemb * size, area); + if (addr != NULL) + memset((void *)addr, 0, size * nmemb); + + return addr; +} + void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size, int area) { void *pt; |