Why linux is not clearing Cache memory and assigning it to other process which are requesting ?

I am getting out of memory error but could see lot of cache .

closed as unclear what you're asking by Stephen Kitt, steve, Jeff Schaller May 22 at 11:18

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Are you requesting more memory than what's used as cache? – Kusalananda May 21 at 12:30
  • 3
    Add the output of cat /proc/meminfo to your question. You're saying that memory allocation is low but you're not showing any evidence. – wurtel May 21 at 12:36
  • 2
    Please edit any updates into your question - you can still use comments to let people know about the edit. Please include the name and version of your OS when you ask. Some of the reporting tools have changed how they show certain other figures over time. The Cache figure includes Shmem, which cannot be reclaimed. Updating to show cat /proc/meminfo as requested, will show the Shmem figure. – sourcejedi May 21 at 12:37
  • 1
    Even when you create a virtual memory allocation, and Linux default overcommit is enabled: "Obvious overcommits of address space are refused. Used for a typical system. It ensures a seriously wild allocation fails while allowing overcommit to reduce swap usage." stackoverflow.com/questions/38688824/… – sourcejedi May 21 at 12:40
  • 1
    Please confirm that the allocation error is shown by a userspace program, not e.g. a kmalloc() failure inside kernel code. It would be clearer if you tell us what the program is that prints the error. Or if you wrote the program yourself, name the allocation function that you are calling and which you see fail. – sourcejedi May 21 at 12:45

Browse other questions tagged or ask your own question.