linux kernel - vm_area_struct - find MAP_ANONYMOUS mapping -


how can detect area represented vm_are_struct mapped anonymous? assume vm_flags field contains vm_xxx flags doesn't contain map_xx flags. besides vm_page_prot field contains unexpected.

by checking anon_vma pointer (which should set non-null) , vm_file (which should null, if mapping related file):

if(vma->anon_vma != null && vma->vm_file == null) {      // map_anon } 

but anon_vma seem lazily allocated (not initialized after mmap() called).


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -