aboutsummaryrefslogtreecommitdiff
path: root/bsd-core/via_drv.c
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2008-10-10 13:06:22 -0400
committerRobert Noland <rnoland@2hip.net>2008-10-10 13:06:22 -0400
commitcdd3e9fc562bd57e0272e4c4d1c0707776bd01a1 (patch)
tree97d7b554a5c040630fabcb693b7b26ab4ca5a9f1 /bsd-core/via_drv.c
parent1150a42d4398b14c5db2f34a5beba613528df147 (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/via_drv.c')
-rw-r--r--bsd-core/via_drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsd-core/via_drv.c b/bsd-core/via_drv.c
index d16efc43..cae7231c 100644
--- a/bsd-core/via_drv.c
+++ b/bsd-core/via_drv.c
@@ -80,7 +80,7 @@ via_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);
via_configure(dev);
@@ -96,7 +96,7 @@ via_detach(device_t nbdev)
ret = drm_detach(nbdev);
- free(dev->driver, M_DRM);
+ free(dev->driver, DRM_MEM_DRIVER);
return ret;
}