the thing is even if you run any command other than adb devices using system command, I am seeing the same memory increase. for example: replacing
system("adb devices");
with
system("dir"); ## just an example, you can replace it with any comm
+and
the output looks like this:
########## memory usage of perl start of execution ###########
perl.exe 17304 RDP-Tcp#0 1 9,536 K
##############################################################
########## memory usage of perl end of execution ###########
perl.exe 17304 RDP-Tcp#0 1 68,372 K
##############################################################
My question was how can we release the memory allocated by the system command? I understand that perl doesn't release the memory back to OS but it should re-use the memory rather than allocating new memory block for each call, isn't that right?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.