Once we run the app, memory use in our Linux distro grows and so does our WSL 2 VM’s memory in Windows. In Linux, we used the free -h command to output the amount of used and cached memory. ![]() We’re measuring the memory used in Windows by watching the memory use of the ‘Vmmem’ process which is responsible for the virtual machine that powers WSL2. Here’s the source code: #include Ĭhar* buffer = (char*) calloc(3000000000,1) īefore we run the app, we are using a small amount of memory in both Windows and Linux. We’ll run a simple C application which will use a large amount of memory. ![]() ![]() When a Linux process releases in-use memory, that memory will then be returned to the Windows host.
0 Comments
Leave a Reply. |