В task_struct мы можем найти:
struct mm_struct *mm, *active_mm;
struct files_struct *files;
files_struct содержит указатели на до 256 структур данных файла, каждая из которых описывает файл, используемый этим процессом.
struct file * fd_array[NR_OPEN_DEFAULT];
mm_struct содержит vm_area_struct.
struct vm_area_struct * mmap; /* list of VMAs */
А в vm_area_struct мы можем найти:
struct file * vm_file; /* File we map to (can be NULL). */
Итак, мой вопрос:
Какая связь между файлами в fd_array и vm_file?
Все ли файлы, показанные в fd_array, будут также отображены в vm_area_struct так же, как показано на рисунке? Или все файлы, отображенные в vm_area_struct, будут отображаться в fd_array?
Спасибо
занятой кот http://static.duartes.org/img/blogPosts/memoryDescriptorAndMemoryAreas.png