When I am running top command (on embedded system with 64 MB RAM) I am getting below description on total memory usage:

"Mem: 43468K used, 968K free, 0K shrd, 1280K buff, 21896K cached"

It looks like I have only 968 KB of ram free. But meanwhile I can see 21896KB in cache. Can I allocate (malloc) more than 968 from an application meantime ? If I do so, will the ram be reclaimed from cache ?


Linux will use available memory for disk caching, unless it's required by a running program. So your you can allocate (used - cached + free) amount of memory, in your case, 43468 - 21896 + 968

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.