In task_struct we can find:
struct mm_struct *mm, *active_mm;
struct files_struct *files;
files_struct contains pointers to up to 256 file data structures, each of which describes a file used by this process.
struct file * fd_array[NR_OPEN_DEFAULT];
mm_struct contains vm_area_struct.
struct vm_area_struct * mmap;
And in vm_area_struct we can find:
struct file * vm_file;
So my question is:
What is the relationship between files in fd_array and vm_file?
Will all the files shown in fd_array also be displayed in vm_area_struct as shown? Or will all files displayed in vm_area_struct be displayed in fd_array?
Thank,

(source: duartes.org )
source
share