in reply to Memory usage double expected

I reduced it to 1 GB and was still able to reproduce it.

But the effect disappeared, after I changed the logic to avoid temporary data on the RHS.

use v5.12; use warnings; use Devel::Size qw(total_size); my $x = 'a'; $x x= 2**30; # 1GiB print total_size($x) . "\n"; sleep 60;

Seems like the allocated extra space for your 'a' x (2**32) wasn't released.

update

see also Re^2: Memory usage double expected (run-time)

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery