summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/mga_drv.c
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2008-10-13 18:03:27 +0000
committerrnoland <rnoland@FreeBSD.org>2008-10-13 18:03:27 +0000
commit192b3600be5db1effa54d2e72717a7482aaeb52a (patch)
tree9afb72dec01dcbe8a080c5adf1bdbdde1abd41bd /sys/dev/drm/mga_drv.c
parent0d37976f3d86d7805a29299cc21e4b517b824aac (diff)
downloadFreeBSD-src-192b3600be5db1effa54d2e72717a7482aaeb52a.zip
FreeBSD-src-192b3600be5db1effa54d2e72717a7482aaeb52a.tar.gz
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)
Diffstat (limited to 'sys/dev/drm/mga_drv.c')
-rw-r--r--sys/dev/drm/mga_drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/drm/mga_drv.c b/sys/dev/drm/mga_drv.c
index 308269a..8498b9f 100644
--- a/sys/dev/drm/mga_drv.c
+++ b/sys/dev/drm/mga_drv.c
@@ -130,7 +130,7 @@ mga_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);
mga_configure(dev);
@@ -146,7 +146,7 @@ mga_detach(device_t nbdev)
ret = drm_detach(nbdev);
- free(dev->driver, M_DRM);
+ free(dev->driver, DRM_MEM_DRIVER);
return ret;
}
OpenPOWER on IntegriCloud