On Sat, Mar 11, 2023 at 10:50:21AM +0800, zju wrote:
> So is it possible to optimize the continuous growth of memory occupied by 
> child processes?

Someone will have to find where the memory leak is occurring.  You'll
want a more controlled reproducer than an infinite fork bomb.

> Or is there anyway to avoid this problem?

Depends on which problem you mean.  If you're exclusively concerned
about the memory leak, then finding and fixing the bug will take care of
it.  If you mean "prevent people from running a fork bomb", stop giving
untrusted people shells on your system.  That's basically it.

Reply via email to