Question: Task 1 - Memory Information [10 + 5 Marks] This task does have a Fitchfork component and it counts 10 marks. Make sure your output

Task 1 - Memory Information [10 + 5 Marks]

This task does have a Fitchfork component and it counts 10 marks.

Make sure your output is similar to the structure as in the screen-shots below.

For this task you will need to create a C/C++ program to read memory information about an executable, you should use the filename called meminfo.cpp and the target executable meminfo. For detecting memory information about an executable, Linux systems have a built-in package called binutils which has a executable called size. It is suggested you use size since it is a lot more complicated to retrieve executable memory information directly from C++. You need to lookup the following .data, .text and .bss segments, you need to be able to explain each of them during your demo. Things to note: 1. You should have one command line argument that accepts the executables name. 2. You must make use of a subprocess call (eg. popen). 3. You must perform significant error checking, such as invalid files, etc. 4. Your program must display the sizes of each segment in Human Readable bytes. Your program should show the closest range to different sizes for example, 1020 bytes, or 13.65 KB, etc. 5. Your program executable should be able to be accessed in any terminal as seen in (ls, make, rm, etc.) Your output should look something like this.

Task 1 - Memory Information [10 + 5 Marks] This task does

Your output should look something like this. Desktop/COS122/Practicals/2017/Practical4/code] /meninfo /bin/ls MEMINFO FILE: /bin/ls TEXT: 119.80 KB DATA: 4.55 KB BSS: 4.45 KB TOTAL: 128.80 KB [+/Desktop/Cosi 22/Practicals/2017/Practica!4/code] => Your output should look something like this. Desktop/COS122/Practicals/2017/Practical4/code] /meninfo /bin/ls MEMINFO FILE: /bin/ls TEXT: 119.80 KB DATA: 4.55 KB BSS: 4.45 KB TOTAL: 128.80 KB [+/Desktop/Cosi 22/Practicals/2017/Practica!4/code] =>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!