Subject: | memory leak in |
Calling get_smaps_summary() leaks memory:
mendel@vger:~/src/linux-smaps-tiny$ perl
-MLinux::Smaps::Tiny=get_smaps_summary -E 'sub pd { say
get_smaps_summary($$)->{Private_Dirty} } pd; get_smaps_summary($$) for 0
.. 999; pd;'
464
876
I have a patch that seems to fix it, but i'm not experienced with XS so
it might as well be completely wrong:
mendel@vger:~/src/linux-smaps-tiny/.build/ro4QfSZ04s$ perl
-MLinux::Smaps::Tiny=get_smaps_summary -E 'sub pd { say
get_smaps_summary($$)->{Private_Dirty} } pd; get_smaps_summary($$) for 0
.. 999; pd;'
772
772
I pushed the patch to
https://github.com/mendel/linux-smaps-tiny/tree/mortalize_HV