diff options
author | rnoland <rnoland@FreeBSD.org> | 2008-10-13 18:03:27 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2008-10-13 18:03:27 +0000 |
commit | 192b3600be5db1effa54d2e72717a7482aaeb52a (patch) | |
tree | 9afb72dec01dcbe8a080c5adf1bdbdde1abd41bd /sys/dev/drm/mach64_drv.c | |
parent | 0d37976f3d86d7805a29299cc21e4b517b824aac (diff) | |
download | FreeBSD-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/mach64_drv.c')
-rw-r--r-- | sys/dev/drm/mach64_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/drm/mach64_drv.c b/sys/dev/drm/mach64_drv.c index 7ab9683..6c72d13 100644 --- a/sys/dev/drm/mach64_drv.c +++ b/sys/dev/drm/mach64_drv.c @@ -86,7 +86,7 @@ mach64_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); mach64_configure(dev); @@ -102,7 +102,7 @@ mach64_detach(device_t nbdev) ret = drm_detach(nbdev); - free(dev->driver, M_DRM); + free(dev->driver, DRM_MEM_DRIVER); return ret; } |