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/drm_auth.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/drm_auth.c')
-rw-r--r-- | bsd-core/drm_auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bsd-core/drm_auth.c b/bsd-core/drm_auth.c index b5fc5587..6a76ed59 100644 --- a/bsd-core/drm_auth.c +++ b/bsd-core/drm_auth.c @@ -74,7 +74,7 @@ static int drm_add_magic(struct drm_device *dev, struct drm_file *priv, DRM_SPINLOCK_ASSERT(&dev->dev_lock); hash = drm_hash_magic(magic); - entry = malloc(sizeof(*entry), M_DRM, M_ZERO | M_NOWAIT); + entry = malloc(sizeof(*entry), DRM_MEM_MAGIC, M_ZERO | M_NOWAIT); if (!entry) return ENOMEM; entry->magic = magic; @@ -118,7 +118,7 @@ static int drm_remove_magic(struct drm_device *dev, drm_magic_t magic) if (prev) { prev->next = pt->next; } - free(pt, M_DRM); + free(pt, DRM_MEM_MAGIC); return 0; } } |