Free to wrong pool 678ea0 not e228dd0 at .\common\GUI_TESTS\test_memory_hog_gui.pl line 41.
####
perl -V:ivsize # ivsize='8';
perl -V:ptrsize # ptrsize='8';
perl -V:archname # archname='MSWin32-x64-multi-thread';
##
##
use strict;
use warnings;
use Tk;
use Tk::LabFrame;
use Clone;
my $MAIN_WINDOW = MainWindow->new;
$MAIN_WINDOW->minsize(400, 400);
my @dataStructureClones = ();
my $textBox;
my $button_frame = $MAIN_WINDOW->LabFrame(-label => "Test", -relief => 'groove', -borderwidth => 2)->pack();
$button_frame->Button(
-text => 'Run Crashing Operation',
-command => sub {
my $dataStructureThatCrashes = {
NETLIST_INFO => {
EXTRA_PROPERTIES => {
C_SIGNAL => {},
NET => {},
},
NET_LIST => [
# omitting this call will allow the program to exceed 4GB until after it finishes the loop
{ NL_INDEX => 0, }
]
},
};
my $lastUpdate = time();
push @dataStructureClones, $dataStructureThatCrashes;
for (1 .. 5000000) {
if (time() - $lastUpdate > 1) {
# omitting this call will allow the program to exceed 4GB
$textBox->insert("end", "Cloning hash ($_)...\n");
$MAIN_WINDOW->update();
$lastUpdate = time();
}
push @dataStructureClones, Clone::clone($dataStructureThatCrashes);
}
}
)->grid(-row => 0, -column => 0);
$textBox = $MAIN_WINDOW->Scrolled(
'Text',
-relief => 'groove',
-background => 'light grey',
-foreground => 'black',
-wrap => 'char',
-scrollbars => 'osoe',
-width => 110,
-height => 24,
)->pack(-side => 'top', -fill => 'both', -expand => 1);
MainLoop;