diff options
author | Robert Noland <rnoland@2hip.net> | 2008-10-10 13:06:22 -0400 |
---|---|---|
committer | Robert Noland <rnoland@2hip.net> | 2008-10-10 13:06:22 -0400 |
commit | cdd3e9fc562bd57e0272e4c4d1c0707776bd01a1 (patch) | |
tree | 97d7b554a5c040630fabcb693b7b26ab4ca5a9f1 /bsd-core/mach64_drv.c | |
parent | 1150a42d4398b14c5db2f34a5beba613528df147 (diff) |
[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.
Diffstat (limited to 'bsd-core/mach64_drv.c')
-rw-r--r-- | bsd-core/mach64_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bsd-core/mach64_drv.c b/bsd-core/mach64_drv.c index 03a533a9..1cbe5f39 100644 --- a/bsd-core/mach64_drv.c +++ b/bsd-core/mach64_drv.c @@ -83,7 +83,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); @@ -99,7 +99,7 @@ mach64_detach(device_t nbdev) ret = drm_detach(nbdev); - free(dev->driver, M_DRM); + free(dev->driver, DRM_MEM_DRIVER); return ret; } |