tags:

views:

237

answers:

1

Hi All, I have a 64 bit Linux (SUSE 10) dual processor. When I run my process it uses around 4 G of virtual memory. Only 3G is resident memory. Rest around 9G memory is free. How to load this 1 G also in RAM? Why it is still in swap space why kernel can't load this into RAM when all the RAM is available.

Rahul

+1  A: 

The kernel could load the data into memory. However, when they are not used, it choses to write them out to the swap file.

If you absolutely want the data in memory, you should either turn off all swap files (using swapoff(8)), or lock the specific pages into memory, using mlock or mlockall.

Martin v. Löwis