Re: Need help analyzing (kernel?) memory usage and reclaiming RAM (Debian Stretch)
Hi.
On Tue, Apr 16, 2019 at 04:39:32PM +0200, Peter Wiersig wrote:
> VSZ is the Virtual Memory Size. It includes all memory that the process
> can access, including memory that is swapped out, memory that is
> allocated, but not used, and memory that is from shared libraries.""
Given this:
== cut ==
#include <stdlib.h>
#include <unistd.h>
void main(void)
{
char* a = malloc(4l*1024l*1024l*1024l);
sleep(1200);
}
== cut ==
One can expect the process to "consume" 4Gb of VSZ, and about 700kb of
RSS.
Do you really suggest to treat all this VSZ as a "used memory"? A hint -
compile the sample, run it a hundred times.
Reco
Reply to: