Вопрос

For example, when a particular application runs, it causes 10M of memory leaks. If I kill the process, will the 10M be recovered by the system?

I tried to check myself:

  • I created an application that will cause 10M memory leak.
  • Before I run it, I used "Memory Doctor" to check my free memory. (250.4M)
  • After I run and kill it, the "Memory Doctor" show my free memory is 240M.

I want to confirm: when the application killed, will the memory consumed by the process be reclaimed by the operating system or not?

Это было полезно?

Решение

Yes, killed processes will return any used memory to the operating system.

Keep in mind that any filesystem cache used by the application may not be free'd immediately.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top