wuzhipeng2014 / freenos

Automatically exported from code.google.com/p/freenos
GNU General Public License v3.0
0 stars 0 forks source link

Memory leak(s) when executing commands with forkexec() #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When executing commands with forkexec(), the available system memory slowly
decreases:

(localhost) # memstat
Total: 130620 KB
Available: 90672 KB
(localhost) # memstat
Total: 130620 KB
Available: 90652 KB
(localhost) # memstat
Total: 130620 KB
Available: 90640 KB

Possibly, some memory is not yet freed by any of the servers or the kernel.

Original issue reported on code.google.com by coenbijlsma on 7 Aug 2009 at 10:31

GoogleCodeExporter commented 9 years ago

Original comment by coenbijlsma on 7 Aug 2009 at 11:05

GoogleCodeExporter commented 9 years ago
I'm just an outsider and not really related to the subject, but maybe this 
function 
shouldn't be called like this?

The POSIX folks added these functions, posix_spawn() and posix_spawnp() to 
spawn 
processes instead of using fork(), followed by exec(). The idea behind 
posix_spawn() and 
posix_spawnp() is that on some embedded architectures, it is very hard to 
implement 
fork(), if not impossible. There is a big performance overhead with fork() on 
systems 
that don't have proper memory management.

Original comment by edschou...@gmail.com on 11 Aug 2009 at 7:00