#! perl -slw use strict; use Time::HiRes qw[ time ]; use threads; <>; my $start = time; async { my $s = chr(0) x 1000; for( 1 .. 5e5 ) { $s .= chr( 0 ) x 1000; } }->detach; my $s = chr(0) x 1000; for( 1 .. 5e5 ) { $s .= chr( 0 ) x 1000; } printf "Re-allocated 2 x 500MB (in 1000 byte incements) on two threads in %.3f\n", time() - $start; <>; __END__ C:\perl\5.10.1\bin>.\perl.exe \test\mem.pl Re-allocated 2 x 500MB (in 1000 byte incements) on two threads in 2.416