in reply to Re^3: System call doesn't work when there is a large amount of data in a hash
in thread System call doesn't work when there is a large amount of data in a hash
Without seeing your code, it will be very hard to suggest things on how to make it do what you want.
You have discarded all the obvious things that would make it easier, because you say that you really need this.
Ideally, you show us some minimal code that reproduces the problem so that we can run it ourselves. For example, the following could be a start:
#!perl use strict; use warnings; my $memory_eaten = 8 * 1024 * 1024 * 1024; # 8GB, adjust to fit my %memory_eater = ( foo => scalar( " " x $memory_eaten ), ); my $cmd = "foo bar"; system($cmd) == 0 or die "Couldn't launch '$cmd': $!/$?";
Updated: Actually make the hash eat memory by creating a loong string
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: System call doesn't work when there is a large amount of data in a hash
by Nicolasd (Acolyte) on Apr 29, 2020 at 15:00 UTC | |
Re^5: System call doesn't work when there is a large amount of data in a hash
by Nicolasd (Acolyte) on Apr 29, 2020 at 11:21 UTC |