in reply to Re^5: How to improve memory usage in this script??
in thread How to improve memory usage in this script??
ok thx a lot for the script browseruk, thx for the fast response! ;).
now when i run it it gave me an error "Can't "next" outside a loop block" so used while( ++$ips ){}; instead of the do().
now as for the memory usage, it now took a lot more. When at 10.0.43 it was already at 60mb and increasing.(remember that all i got so far is timeouts, so 60mb really is too much in my opinion)
im interested in the fork method because of this
"you can fork off one subnet at a time to a child process and its memory will get reclaimed when it exits.".
so if i understood correctly, you would scan 255 ips with a child, then when done all thememory they used will get returned?.
So, if the script takes 10mb scanning 10.0.0.0-10.0.0.255
the 10.0.0.0-10.0.1.255 scan should take aproximately the same??