Monday, October 29, 2018

Memory Management Goop in Windows and Linux

Regardless of the operating system you use, you are going to get roughly the same services from each of them. In particular, process and memory isolation, managing the hardware, etc. It can sometimes be really interesting to see the difference between the operating systems approach to solving the same problem. Case in point, how both Windows and Linux manage memory. Both of them run on the same hardware and do roughly the same thing. But they have very different styles, this ends up having profound implications on the application using them.

Consider what appears to be a very simple question, what stuff do I have in my RAM? Linux keeps track of Resident Set Size on a per-mapping basis, which means that we are able to figure out how much of a mmap file is actually in memory. Furthermore, we can figure out how much of the mmap data is clean, which means that it is easily discardable and how much is dirty and needs to be written to disk. Linux exposes this information via the /proc/[pid]/smaps.



from DZone.com Feed https://ift.tt/2SrTYbY

No comments:

Post a Comment