zeus
eccfb62e2b
|
4 years ago | |
---|---|---|
.. | ||
bin | 4 years ago | |
objects | 4 years ago | |
sources | 4 years ago | |
LICENSE | 4 years ago | |
Makefile | 4 years ago | |
README.md | 4 years ago | |
tags | 4 years ago |
README.md
memory-visualization-examples
PLEASE NOTE THAT THE FOLLOWING REQUIRES A UNIX ENVIRONMENT!!!!
❗ You will have to use the windows equivelant of the commands to run on Windows.
To compile please run make inside the root directory of the project.
You should have an executable named simple-array located under bin.
Lets run it!
After running the executable it will stall waiting for input.
sudo apt-get install libc-dev
Copy and paste the command ("pmap <pid>") into another shell instance.
This command will show a visual image of the virtual memory that was created for our program.
We can now easilly locate the standard c library and the linked (ld) library that are loaded in memory.
We can also locate the chunks of data that our program has allocated.
After pressing any key the program will stall once again after creating a table of one hundred thousand chars.
Now we should be able to locate an additional large chunk of data in our vram image.
ℹ️ Ofcourse you can edit the source file (located under /sources) and perform a different operation and see the results using pmap.
⚠️ You could also try compiling the project as C++, thus loading additionall runtime libraries
(make sure to use g++ to force linkage with libstdc++ and shared-libgcc. GCC by default links to the c++ libs only if it detects c++ code!)