Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6705117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:22:01+00:00 2026-05-26T07:22:01+00:00

In task_struct , we can find there are: struct mm_struct *mm, *active_mm; struct files_struct

  • 0

In task_struct, we can find there are:

struct mm_struct *mm, *active_mm;
struct files_struct *files;  

files_struct contains pointers to up to 256 file data structures, each one describing a file being used by this process.

struct file * fd_array[NR_OPEN_DEFAULT];

mm_struct contains a vm_area_struct.

struct vm_area_struct * mmap;           /* list of VMAs */

And in vm_area_struct, we can find:

struct file * vm_file;          /* File we map to (can be NULL). */

So my question are:

  1. what is the relationship between the files in fd_array and the vm_file?

  2. Are all the files shown up in the fd_array will also be mapped in the vm_area_struct in a way similar as shown in the picture? Or, are all the files mapped in the vm_area_struct will show up in the fd_array?

Thanks,

a busy cat
(source: duartes.org)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:22:01+00:00Added an answer on May 26, 2026 at 7:22 am

    The files in fd_array are those that currently have a file descriptor associated with them (eg. opened with open(), socket() or similar), and those linked by VMAs are those that are mapped into process memory (eg. with mmap()). Files can be in either category or in both, so those files in fd_array are not necessarily linked by a VMA and vice-versa.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to access the number of blocks allocated to a file
I am not clear with following code struct nsproxy init_nsproxy = INIT_NSPROXY(init_nsproxy); this can
I have some example data: public struct Task { public int INT; public string
Previously, I am using STL map to perform the mentioned task. struct ltstr {
Simple task like make AJAX request , pass one parameter and return result, can
Can somebody clear me out why would I use union and with what purpose
My present task is to dissect tcpdump data that includes P2P messages and I
We found something similar to the following (don't ask ...): namespace N { struct
I've a list of tasks. Ie I've struct like struct Task { public DateTime
I have been given a task of inputting some student data, like option 1:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.