summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/i915_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/i915_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/i915_drv.c')
-rw-r--r--sys/dev/drm/i915_drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/drm/i915_drv.c b/sys/dev/drm/i915_drv.c
index ad213e5..478e62b 100644
--- a/sys/dev/drm/i915_drv.c
+++ b/sys/dev/drm/i915_drv.c
@@ -112,7 +112,7 @@ i915_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);
i915_configure(dev);
@@ -128,7 +128,7 @@ i915_detach(device_t nbdev)
ret = drm_detach(nbdev);
- free(dev->driver, M_DRM);
+ free(dev->driver, DRM_MEM_DRIVER);
return ret;
}
OpenPOWER on IntegriCloud