Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I have a curiosity about memory management in Linux: It is possible to determine the use of real memory? (That memory that is being used actually, without being allocated only). How can I do it?

Explanation:
To my knowledge, linux only releases memory when you need it, so if I do not popped the memory overrun limit I can have a large area of memory that is allocated, however not in use. Is there any way I calculate only what is actually in use at the moment?

share|improve this question
3  
What do you mean by "used" if not "allocated"? "Being read"? "Being written?" Something else? –  John WH Smith Dec 22 '14 at 16:43
    
to my knowledge, linux only releases memory when you need it, so if I do not popped the memory overrun limit I can have a large area of memory that is allocated, however not in use. Is there any way I calculate only what is actually in use at the moment? –  RegiUnix Dec 22 '14 at 16:46
    
On system memory… specifically the difference between tmpfs, shm, and hugepages… may help. I showed some calculations there. –  eyoung100 Dec 22 '14 at 16:47
    
@RegiUnix Explanations should usually be added to the question so that the audience doesn't have to read all the comments. –  Hauke Laging Dec 22 '14 at 16:48
1  
@RegiUnix Look at the 2nd line of the free command. The integer value against '-/+ buffers/cache' under the used coloumn will tell you how much memory is being used (not taking into consideration the amount allocated to cache and buffers. –  Sree Dec 22 '14 at 17:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.