Question: Recall the C example code ( vm . c ) used in our lecture demo about virtual memory, given in below: #include #include #include int
Recall the C example code vmc used in our lecture demo about virtual memory, given in below:
#include
#include
#include
int mainint argc, char argv
int i ;
int p mallocsizeofint;
if argc
printfusage: mem
;
exit;
printfd addr pointed to by p: p
int getpid p;
p atoiargv;
fori; i; i
sleep;
p p ;
printfd value of p: d
int getpidp;
freep;
return ;
Compile and run it with the following command:
gcc vmc && aout
Let's say we get the following output:
addr pointed to by p: xfa
value of p:
value of p:
value of p:
value of p:
value of p:
Which section of the virtual memory space of this programprocess is used to store the printedout value xfa
Group of answer choices
Stack section
Data section
Text section
Heap section
None of them
Kernelreserved section
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
