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/radeon_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bsd-core/radeon_drv.c') diff --git a/bsd-core/radeon_drv.c b/bsd-core/radeon_drv.c index ab5968b2..46bccb39 100644 --- a/bsd-core/radeon_drv.c +++ b/bsd-core/radeon_drv.c @@ -87,7 +87,7 @@ radeon_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); radeon_configure(dev); @@ -103,7 +103,7 @@ radeon_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