This is just a quick note so I don’t forget. If you don’t run a memset, the memory will only be allocated, but not shown as being used in the OS.
int main() {
int i = 1;
while(i++ < 10) {
void *m = malloc(100*1024*1024);
memset(m,0,100*1024*1024);
sleep(1);
}
return 0;
}