I am initializing a global shared variable as such:
my $CLIENT_DATA : shared;
Then, within a thread I do the following:
# returns a perl data structure, hash of hashes
my $tmp = initClientData( $dbh );
lock($CLIENT_DATA);
$CLIENT_DATA = shared_clone($tmp);
Each time I do this, the contents of $CLIENT_DATA gets updated properly, but the memory footprint of the process goes up. Is this expected, and is there any way to avoid this?
Thanks,
Matt