fuzzmonkey has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks, I'm learning about genetic algorithms and I am working with a script that searches random strings for executable code. The problem with eval($string) in perl 5.10 is that strings that fail to execute correctly leave a bit of memory locked up. I can't run the script for very long because it causes a memory leak. I've searched around for a solution but I really want to continue evaluating random strings for nuggets of executable code. I can't upgrade to a newer version of Perl on this machine either. Is there some way to capture a reference to eval($string) and undef it? Would that free the memory?
I'm working with OpenBSD 4.4 and it's default of Perl 5.10.
Thanks!
|
|---|