Bash: Is memory leak applicable for a bash script in UNIX? Bash: Is memory leak applicable for a bash script in UNIX? unix unix

Bash: Is memory leak applicable for a bash script in UNIX?


My definition of memory leak (from wikipedia) : In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations[1] in such a way that memory which is no longer needed is not released.

So the fork bomb doesn't qualify as the memory is still needed.

You can't manage memory yourself with bash, so no, you can't create memory leaks within a bug free version of pure bash code.

So if that is not the case (you have bug or use external code), the answer is yes and you can use a tool like Valgrind. Either using it on your bash script or on the calls of external code (from within the bash script).

It supports many platform and works with any language.