How to find memory used by a function in java
<p>I am calling a function from my code (written in java) and I want to know how much memory that function is using, and do keep in mind that I cannot add any code to the function(which I am calling).</p>

<p>for eg-</p>

<pre><code> //my code starts
   .
   .
   .
   .
   myfunc();
 //print memory used by myfunc() here
  .
  .
 // my code ends
</code></pre>

<p>How to do this?</p>
