• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 433
  • Last Modified:

OS not releasing resident memory after process dies

My application is running on a 64 bit linux, running 32bit code.
After my process is killed after hitting 4G resident memory consumption, not all the memory is released to the OS, even though the process is killed.
What can cause OS not to release the memory after the process is killed?

2 Solutions
Joseph GanSystem AdminCommented:
Try using sync command ($ sync) or restart.
This is completely normal and good.
Freeing memory is a very quick and easy operation, while reloading anything from disk is a much more complex and time consuming operation. When an application closes the system does not immediately free memory used by code and some other support files in the event that it might be needed again. If it is then your applications perform better. If not, then the memory can be quickly freed when it is needed for some other purpose.

All modern operating systems do this.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now