Am running into a bit of a snafu using a BitCollector in a persistent
environment. After calling the following code, memory utilization
grows arithmetically:
my $bit_vector = $collector->get_bit_vector();
my $result_ids = $bit_vector->to_arrayref();
From what I can tell, the array returned to perl is never freed up.
From BitVector.pm:
Kino_BitVec_to_array(BitVector* bit_vec) {
U32 num = 0;
AV *out_av;
out_av = newAV();
while (1) {
num = Kino_BitVec_next_set_bit(bit_vec, num);
if (num == KINO_BITVEC_SENTINEL)
break;
av_push( out_av, newSViv(num) );
num++;
}
return out_av;
}
Anyone run into this problem? Any suggestions for whether I'm on
base, or potentially how to solve for this?
Thanks,
Matthew Berk
Lead Search Architect
t 206.331.3528
f 206.331.3695
matthew@openlist.com
Marchex, Inc.
http://www.marchex.com
This email message and any attachments are solely for intended
recipients, and may contain information that is privileged and
confidential. If you are not the intended recipient, any
dissemination, distribution or copying is strictly prohibited. If you
believe that you may have received this message in error, please
immediately notify the sender by replying to this e-mail message.
environment. After calling the following code, memory utilization
grows arithmetically:
my $bit_vector = $collector->get_bit_vector();
my $result_ids = $bit_vector->to_arrayref();
From what I can tell, the array returned to perl is never freed up.
From BitVector.pm:
Kino_BitVec_to_array(BitVector* bit_vec) {
U32 num = 0;
AV *out_av;
out_av = newAV();
while (1) {
num = Kino_BitVec_next_set_bit(bit_vec, num);
if (num == KINO_BITVEC_SENTINEL)
break;
av_push( out_av, newSViv(num) );
num++;
}
return out_av;
}
Anyone run into this problem? Any suggestions for whether I'm on
base, or potentially how to solve for this?
Thanks,
Matthew Berk
Lead Search Architect
t 206.331.3528
f 206.331.3695
matthew@openlist.com
Marchex, Inc.
http://www.marchex.com
This email message and any attachments are solely for intended
recipients, and may contain information that is privileged and
confidential. If you are not the intended recipient, any
dissemination, distribution or copying is strictly prohibited. If you
believe that you may have received this message in error, please
immediately notify the sender by replying to this e-mail message.