You are not logged in.
Hello,
I have a memory leak with updatedb.
Do you have the same problems?
Is this a known bug?
Thanks.
┏━━━┫ root@pc14570 ~ ┣━━━━━━━━━━━━━━━━━━━━
┗━┫ free -m ; updatedb ;free -m
total used free shared buffers cached
Mem: 15925 395 15529 47 19 146
-/+ buffers/cache: 229 15695
Swap: 0 0 0
total used free shared buffers cached
Mem: 15925 566 15358 47 114 156
-/+ buffers/cache: 295 15629
Swap: 0 0 0
┏━━━┫ root@pc14570 ~ ┣━━━━━━━━━━━━━━━━━━━━
┗━┫locate -S
Database /var/lib/mlocate/mlocate.db:
49063 directories
443871 files
29061235 bytes in file names
10911126 bytes used to store database
┏━━━┫ root@pc14570 ~ ┣━━━━━━━━━━━━━━━━━━━━
┗━┫
Last edited by nenesse (2014-06-22 15:43:43)
Offline
You are misinterpreting things.
Regardless of whether a program looses track of memory it has been allocated by the kernel and therefore fails to properly free it, the kernel does not forget. When the application exits, all of the memory it had allocated will be released by the kernel.
What you are seeing is an increase the amount of stuff that is cached. Unused memory is wasted memory. Updatedb happens to read a bunch of files. The kernel takes some of that unused memory and keeps some of the interesting stuff in the files that were read in memory so that if you turn around and ask for that information again, it is at hand. If you need the memory for something else, the kernel will release the stuff in that cached space and allocate it as needed.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Thank you for that precision.
Offline