Question

What is the use of mmap() in code coverage (Linux)? Please explain

What is the use of mmap() in code coverage (Linux)? Please explain

Homework Answers

Answer #1
  • In computing, mmap() is a POSIX-compliant Unix system call that maps files or devices into memory. It is a method of memory-mapped file I/O. It implements demand paging, because file contents are not read from disk directly and initially do not use physical RAM at all. The actual reads from disk are performed in a "lazy" manner, after a specific location is accessed. After the memory is no longer needed, it is important to munmap() the pointers to it. Protection information can be managed using mprotect(), and special treatment can be enforced using madvise().
  • The mmap() function asks to map length bytes starting at offset offset from the file (or other object) specified by the file descriptor fd into memory, preferably at address start. This latter address is a hint only, and is usually specified as 0. The actual place where the object is mapped is returned by mmap().
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Please analyze and summarize the accomplishing tasks with Linux commands and Linux.
Please analyze and summarize the accomplishing tasks with Linux commands and Linux.
Briefly explain how Linux SECCOMP may be used to prevent RoP attacks that use system calls.
Briefly explain how Linux SECCOMP may be used to prevent RoP attacks that use system calls.
Run Using Kali Linux....Create a source code file named "Lab1.c". The code is as follows. A...
Run Using Kali Linux....Create a source code file named "Lab1.c". The code is as follows. A child is created and prints a message five times. The original process (parent) prints a message only three times. How would this code look on the compiler if you could please post the code and the compiler results. Need Reference Thank You #include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> int main() { pid_t pid; char *message; int n; printf("fork program starting\n"); pid =...
What is the Free Software Foundation/GNU? What is Linux? Which parts of the Linux operating system...
What is the Free Software Foundation/GNU? What is Linux? Which parts of the Linux operating system did each provide? Who else has helped build and refine this operating system?
Lab of operating system: please use the linux server please so all the commands used and...
Lab of operating system: please use the linux server please so all the commands used and the output PROBLEM 1: Create a file and name it f1 • Cerate a directory and name it d1 • Move f1 to d1 • Create a directory and name it d2 • Move d1 to d2 • Check if d1 is inside d2 • Check if f1 is inside d1 • While your (Current Working Directory) CWD is d1, move back f1 to...
How would I go about answering these questions In linux. Please provide the correct linux command...
How would I go about answering these questions In linux. Please provide the correct linux command needed to answer these 4 questions 5. Display total words of each file under your root directory and subdirectories. 6. Change permission of every filename ends “.py” to — write read execute, group - read execute, other - execute 7. Find every line which contains “hello” from your file system, display both file name, line number. 8. Combine files with name “p3.py”, “p31.py”, “p32.py”,...
Linux OS comes with various distributions around the world. Explain THREE (3) influencing factors when comes...
Linux OS comes with various distributions around the world. Explain THREE (3) influencing factors when comes to installing Linux distribution.
What is a loan-to-value ratio? What is a coverage ratio? How can we use these to...
What is a loan-to-value ratio? What is a coverage ratio? How can we use these to evaluate loans? Give an example of each.
Time to time administrators check password files for weak passwords. a) Name three tools in Linux...
Time to time administrators check password files for weak passwords. a) Name three tools in Linux you would use to test for weak passwords? b) Describe how /etc/shadows stores a password on Linux hosts? c) Explain how a brute force password on /etc/shadow would work on linux ?
An insurance company has info that 96% of its auto policy holders use collision coverage or...
An insurance company has info that 96% of its auto policy holders use collision coverage or uninsured motor coverage. 89% of policy holders use collision coverage while 75% use uninsured motor coverage. 1)What percentage of policy holders dont use either? 2)What percentage of them use both? 3) What percentage use collision but not uninsured motor coverage? 4) What percentage of them use uninsured but not collision coverage?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT