Linux memory type questions

I have the following questions regarding Linux memory:

  • I know that active memory is the part of the memory that is most often accessed. But can anyone explain to me how Linux thinks the memory cell is used for active memory or inactive memory.

  • What includes all components of active memory? Whether the disk / file cache is considered part of the active memory.

  • What is the difference between Buffersand Cachedmemory?

+5
source share
1 answer

I am trying to answer your questions:

(1) , . Linux. Linux LRU ( ) . Linux , LRU, LRU_INACTIVE_ANON, LRU_ACTIVE_ANON ( ), LRU_INACTIVE_FILE, LRU_ACTIVE_FILE ( ), LRU_UNEVICTABLE. LRU ( , ). . . , , . , .

(2) /, ​​Linux , . , malloc, , ​​Linux .

(3) , , , : ​​ , . (, , , ) - ( , ). ​​ , ​​ .

, , / , - - .

+3
source

All Articles