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
Linux File Systems: Please write down a pseudo code that implements shell command “find . -name...
Linux File Systems: Please write down a pseudo code that implements shell command “find . -name myfile -print”.
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 =...
Subject:System admin and Unix program. Please use Ubuntu for any Linux scrip 1.Some log messages are...
Subject:System admin and Unix program. Please use Ubuntu for any Linux scrip 1.Some log messages are extremely important and should be reviewed by an administrator immediately. What scripts or other automation could you set up to make sure that this happens as quickly as possible? *Please follow these steps to submit your work: Combine your approach and any scripts into a Word document
if the chrontab and dev server is down how to make it up? please explain what...
if the chrontab and dev server is down how to make it up? please explain what commands has to be written in linux chrontab to make it up ?
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...
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?
Briefly explain any difference you find in managing applications with Windows and Linux.
Briefly explain any difference you find in managing applications with Windows and Linux.
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.