diff options
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/kgem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index fba0693b..6d7eceb2 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -2089,6 +2089,9 @@ uint32_t kgem_add_reloc(struct kgem *kgem, static void kgem_trim_vma_cache(struct kgem *kgem) { + if (kgem->vma_count > MAX_VMA_CACHE && kgem->need_purge) + kgem_purge_cache(kgem); + /* vma are limited on a per-process basis to around 64k. * This includes all malloc arenas as well as other file * mappings. In order to be fair and not hog the cache, |