in reply to
Memory leak issue with Embedded Perl
Well, I am by no means a C expert. Actually, I am by no means a Perl expert either. But let it pass. My one guess would be: your Perl code doesn't seem to be using my very much. Variables like %dbm and @list2 aren't lexically scoped with my so they will hang around after you exit the subroutine. Which you probably don't want, and might be causing the memory leak.
And you almost definitely want to put use strict; at the top of your Perl. That will complain about unscoped global variables, and a lot of other things, and enforce good code discipline.
|A massive flamewar beneath your chosen depth has not been shown here|