From cdd3e9fc562bd57e0272e4c4d1c0707776bd01a1 Mon Sep 17 00:00:00 2001 From: Robert Noland Date: Fri, 10 Oct 2008 13:06:22 -0400 Subject: [FreeBSD] Rework all of the memory allocations Allocate memory from different pools. This allows the OS to track memory allocations for us, much like the linux memory debugging. This will ease tracking down memory leaks since the OS can track the number of allocations from each pool and help to point us in the right direction. Also replace drm_alloc and friends with static __inline__ versions while we are here. --- bsd-core/i915_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bsd-core/i915_drv.c') diff --git a/bsd-core/i915_drv.c b/bsd-core/i915_drv.c index 87703210..0c36a6f1 100644 --- a/bsd-core/i915_drv.c +++ b/bsd-core/i915_drv.c @@ -109,7 +109,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); @@ -125,7 +125,7 @@ i915_detach(device_t nbdev) ret = drm_detach(nbdev); - free(dev->driver, M_DRM); + free(dev->driver, DRM_MEM_DRIVER); return ret; } -- cgit v1.2.3