aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_drv.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-10-17 19:52:34 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-10-17 19:52:34 +0200
commitf22f89e6b3c970a29197d3a53c170fb7d0340cbe (patch)
treee36c1e56ae728a57c2af09025a82786d944b6006 /linux-core/drm_drv.c
parentd515936ea7f98f6aaa9217699796beadef9d664b (diff)
Add vma list memory usage to memory accounting.
Use byte unit for /proc printout of memory usage for small sizes to be able to detect memory allocation bugs more easily.
Diffstat (limited to 'linux-core/drm_drv.c')
-rw-r--r--linux-core/drm_drv.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index e1ee35c1..75c89c1c 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -228,7 +228,7 @@ int drm_lastclose(drm_device_t * dev)
if (dev->vmalist) {
for (vma = dev->vmalist; vma; vma = vma_next) {
vma_next = vma->next;
- drm_free(vma, sizeof(*vma), DRM_MEM_VMAS);
+ drm_ctl_free(vma, sizeof(*vma), DRM_MEM_VMAS);
}
dev->vmalist = NULL;
}
@@ -464,14 +464,6 @@ static int drm_create_memory_caches(void)
if (!drm_cache.fence_object)
return -ENOMEM;
- drm_cache.ref_object= kmem_cache_create("drm_ref_object_t",
- sizeof(drm_ref_object_t),
- 0,
- SLAB_HWCACHE_ALIGN,
- NULL,NULL);
- if (!drm_cache.ref_object)
- return -ENOMEM;
-
return 0;
}
@@ -489,8 +481,6 @@ static void drm_free_mem_cache(kmem_cache_t *cache,
static void drm_free_memory_caches(void )
{
- drm_free_mem_cache(drm_cache.ref_object, "ref object");
- drm_cache.ref_object = NULL;
drm_free_mem_cache(drm_cache.fence_object, "fence object");
drm_cache.fence_object = NULL;
drm_free_mem_cache(drm_cache.mm, "memory manager block");