$ sudo /usr/share/bcc/tools/memleak # (...) # (much spam while I launched Galactic Civilizations III and paused the process) # (...) [19:49:51] Top 10 stacks with outstanding allocations: 13029376 bytes in 3181 allocations from stack __alloc_pages_nodemask+0x2b3 [kernel] __alloc_pages_nodemask+0x2b3 [kernel] __do_page_cache_readahead+0xa7 [kernel] ondemand_readahead+0x198 [kernel] generic_file_read_iter+0x589 [kernel] new_sync_read+0x15e [kernel] vfs_read+0x9d [kernel] ksys_read+0x67 [kernel] do_syscall_64+0x5f [kernel] entry_SYSCALL_64_after_hwframe+0x44 [kernel] 14348288 bytes in 3503 allocations from stack __alloc_pages_nodemask+0x2b3 [kernel] __alloc_pages_nodemask+0x2b3 [kernel] __do_page_cache_readahead+0xa7 [kernel] ondemand_readahead+0x198 [kernel] filemap_fault+0x266 [kernel] ext4_filemap_fault+0x2d [kernel] __do_fault+0x38 [kernel] __handle_mm_fault+0xde9 [kernel] handle_mm_fault+0xce [kernel] __do_page_fault+0x244 [kernel] do_page_fault+0x33 [kernel] page_fault+0x1e [kernel] 33554432 bytes in 16 allocations from stack __alloc_pages_nodemask+0x2b3 [kernel] __alloc_pages_nodemask+0x2b3 [kernel] ttm_alloc_new_pages.isra.0+0x9a [kernel] ttm_page_pool_get_pages+0x16d [kernel] ttm_pool_populate+0x144 [kernel] ttm_populate_and_map_pages+0x24 [kernel] ttm_tt_populate.part.0+0x1e [kernel] ttm_tt_bind+0x48 [kernel] ttm_bo_handle_move_mem+0x25f [kernel] ttm_bo_validate+0x124 [kernel] ttm_bo_init_reserved+0x334 [kernel] amdgpu_bo_do_create+0x19f [kernel] amdgpu_bo_create+0x43 [kernel] amdgpu_gem_object_create+0x97 [kernel] amdgpu_gem_create_ioctl+0x99 [kernel] drm_ioctl_kernel+0xb8 [kernel] drm_ioctl+0x23d [kernel] amdgpu_drm_ioctl+0x49 [kernel] do_vfs_ioctl+0x43d [kernel] ksys_ioctl+0x5e [kernel] __x64_sys_ioctl+0x16 [kernel] do_syscall_64+0x5f [kernel] entry_SYSCALL_64_after_hwframe+0x44 [kernel] 34648064 bytes in 8459 allocations from stack __alloc_pages_nodemask+0x2b3 [kernel] __alloc_pages_nodemask+0x2b3 [kernel] __do_page_cache_readahead+0xa7 [kernel] filemap_fault+0x388 [kernel] ext4_filemap_fault+0x2d [kernel] __do_fault+0x38 [kernel] __handle_mm_fault+0xde9 [kernel] handle_mm_fault+0xce [kernel] __do_page_fault+0x244 [kernel] do_page_fault+0x33 [kernel] page_fault+0x1e [kernel] 43175936 bytes in 10541 allocations from stack __alloc_pages_nodemask+0x2b3 [kernel] __alloc_pages_nodemask+0x2b3 [kernel] __do_page_cache_readahead+0xa7 [kernel] ondemand_readahead+0x198 [kernel] generic_file_read_iter+0x55f [kernel] new_sync_read+0x15e [kernel] vfs_read+0x9d [kernel] ksys_pread64+0x65 [kernel] do_syscall_64+0x5f [kernel] entry_SYSCALL_64_after_hwframe+0x44 [kernel] 49762304 bytes in 12149 allocations from stack __alloc_pages_nodemask+0x2b3 [kernel] __alloc_pages_nodemask+0x2b3 [kernel] alloc_pages_vma+0x7d [kernel] __handle_mm_fault+0xe61 [kernel] handle_mm_fault+0xce [kernel] __do_page_fault+0x244 [kernel] do_page_fault+0x33 [kernel] page_fault+0x1e [kernel] copy_user_generic_string+0x2c [kernel] copyout+0x28 [kernel] copy_page_to_iter+0xb0 [kernel] generic_file_read_iter+0x330 [kernel] new_sync_read+0x15e [kernel] vfs_read+0x9d [kernel] ksys_pread64+0x65 [kernel] do_syscall_64+0x5f [kernel] entry_SYSCALL_64_after_hwframe+0x44 [kernel] 124682240 bytes in 30440 allocations from stack __alloc_pages_nodemask+0x2b3 [kernel] __alloc_pages_nodemask+0x2b3 [kernel] __do_page_cache_readahead+0xa7 [kernel] ondemand_readahead+0x198 [kernel] generic_file_read_iter+0x55f [kernel] new_sync_read+0x15e [kernel] vfs_read+0x9d [kernel] ksys_read+0x67 [kernel] do_syscall_64+0x5f [kernel] entry_SYSCALL_64_after_hwframe+0x44 [kernel] 134217728 bytes in 64 allocations from stack kmem_cache_alloc+0x13a [kernel] kmem_cache_alloc+0x13a [kernel] mempool_alloc+0x8d [kernel] bio_alloc_bioset+0xb6 [kernel] ext4_mpage_readpages+0x54a [kernel] read_pages+0x9f [kernel] __do_page_cache_readahead+0x138 [kernel] ondemand_readahead+0x198 [kernel] filemap_fault+0x266 [kernel] ext4_filemap_fault+0x2d [kernel] __do_fault+0x38 [kernel] __handle_mm_fault+0x119f [kernel] handle_mm_fault+0xce [kernel] __do_page_fault+0x244 [kernel] do_page_fault+0x33 [kernel] page_fault+0x1e [kernel] 371195904 bytes in 90624 allocations from stack __alloc_pages_nodemask+0x2b3 [kernel] __alloc_pages_nodemask+0x2b3 [kernel] ttm_alloc_new_pages.isra.0+0x9a [kernel] ttm_page_pool_get_pages+0x16d [kernel] ttm_pool_populate+0x1c6 [kernel] ttm_populate_and_map_pages+0x24 [kernel] ttm_tt_populate.part.0+0x1e [kernel] ttm_tt_bind+0x48 [kernel] ttm_bo_handle_move_mem+0x25f [kernel] ttm_bo_validate+0x124 [kernel] ttm_bo_init_reserved+0x334 [kernel] amdgpu_bo_do_create+0x19f [kernel] amdgpu_bo_create+0x43 [kernel] amdgpu_gem_object_create+0x97 [kernel] amdgpu_gem_create_ioctl+0x99 [kernel] drm_ioctl_kernel+0xb8 [kernel] drm_ioctl+0x23d [kernel] amdgpu_drm_ioctl+0x49 [kernel] do_vfs_ioctl+0x43d [kernel] ksys_ioctl+0x5e [kernel] __x64_sys_ioctl+0x16 [kernel] do_syscall_64+0x5f [kernel] entry_SYSCALL_64_after_hwframe+0x44 [kernel] 1692921856 bytes in 413311 allocations from stack __alloc_pages_nodemask+0x2b3 [kernel] __alloc_pages_nodemask+0x2b3 [kernel] alloc_pages_vma+0x7d [kernel] __handle_mm_fault+0xe61 [kernel] handle_mm_fault+0xce [kernel] __do_page_fault+0x244 [kernel] do_page_fault+0x33 [kernel] page_fault+0x1e [kernel] $ killall -9 GalCiv3.exe $ sudo sh -c 'sync && free && echo 3 > /proc/sys/vm/drop_caches && sync && free' total used free shared buff/cache available Mem: 6046692 1764396 3541712 5504 740584 3946460 Swap: 0 0 0 total used free shared buff/cache available Mem: 6046692 431360 5494576 5516 120756 5415144 Swap: 0 0 0 # over 1400 megabytes of memory were still unavailable after the game was killed