How does mmap work?

后端 未结 3 1480
南笙
南笙 2020-12-28 19:13

I am working on programs in Linux which needs mmap file from harddrive, but i have a question, what can make it fail. Like if all the memories are fragmented, which has only

3条回答
  •  灰色年华
    2020-12-28 19:37

    The short answer is: it depends.

    Depending on the amount of memory you have, the environment you're working in, or the way the mapping is accessed, there are a number of ways mmap can fail. Read the manual page for mmap for more details.

提交回复
热议问题