From 192b3600be5db1effa54d2e72717a7482aaeb52a Mon Sep 17 00:00:00 2001 From: rnoland Date: Mon, 13 Oct 2008 18:03:27 +0000 Subject: Rework memory allocation to allocate memory with different type names. This will ease the identification of memory leaks as the OS will be able to track allocations for us by malloc type. vmstat -m will show all of the allocations. Convert the calls to drm_alloc() and friends, which are used in shared code to static __inline__ while we are here. Approved by: jhb (mentor) --- sys/dev/drm/tdfx_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/drm/tdfx_drv.c') diff --git a/sys/dev/drm/tdfx_drv.c b/sys/dev/drm/tdfx_drv.c index 729ebf4..945657f 100644 --- a/sys/dev/drm/tdfx_drv.c +++ b/sys/dev/drm/tdfx_drv.c @@ -72,7 +72,7 @@ tdfx_attach(device_t nbdev) { struct drm_device *dev = device_get_softc(nbdev); - dev->driver = malloc(sizeof(struct drm_driver_info), M_DRM, + dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); tdfx_configure(dev); @@ -88,7 +88,7 @@ tdfx_detach(device_t nbdev) ret = drm_detach(nbdev); - free(dev->driver, M_DRM); + free(dev->driver, DRM_MEM_DRIVER); return ret; } -- cgit v1.1