using htop I see the script is uing 2Gb memory.$mem = "A" x 1024 ** 3;
Am I missing something or is that Perl created the 1Gb string in memory and then copies it tho $mem and does not release the original? With the emphasize on "copy".
Further "research" shows that this code reports the usage of 3Gb memory and swapped out my browser so it is now very slow to type :).
$mem = "A" x 1024 ** 3; $t = $mem;
In reply to memory usage by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |