01. [30p] RAM Monitoring

RAM Investigation

For this task we will use MemoryLeak.sln inside the Task-01 folder.

:!: Using Windows Performance Recorder, run a program (MemoryLeak.exe) that allocates 1MB of memory every 100 milliseconds for a while and then stops. After the program stops, save the capture, open it in Windows Performance Analyzer and analyze the Virtual Memory Snapshots graph. What conclusion can you draw by looking at the memory usage of the process that is running our program?

:!: Using VMMap, inspect the memory spikes generated by running the same program.

RAM Cleaning

For this task we will a tool called RAMMap. Download it from Microsoft.

Previously we identified that a given program allocated memory and did not free it, which started exhausting our resources. If we still want to run that program, and we do not want to leave it running uninterrupted, we can try “cleaning” our RAM memory during its execution and hope that it helps. Similar with Linux, where we drop caches, in Windows we can use a tool called RAMMap to inspect our memory in detail and free space in RAM.

:!: After starting the program you should see something similar to the image below.

Let's now try to use RAMMap to free memory. In the document you can add just two images, a before-after of running all empty routines. Follow the steps below:

  1. Start RAMMap and position it on the left side of your screen
  2. Start Task Manager and position it on the right side of your screen
  3. Start several applications to get your RAM up to at least ~70%
  4. From the highlighted Empty tab, run every empty routine from top to bottom and inspect the total in Task Manager

:!: Sounds good, but what is a disadvantage of cleaning our RAM too often? Think about performance.

ep/labs/09/contents/tasks/ex1.txt · Last modified: 2023/10/21 14:45 by cezar.craciunoiu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0