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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -