Wiki

Changes between Initial Version and Version 1 of ProcessMemorySize

Show
Ignore:
Timestamp:
05/02/14 17:23:39 (11 years ago)
Author:
Charles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ProcessMemorySize

    v1 v1  
     1= Process Memory Size = 
     2 
     3The following snippet can be used to examine how much memory the process is consuming. 
     4 
     5{{{ 
     6#!cobra 
     7use System.Diagnostics 
     8 
     9class Program 
     10 
     11        def main 
     12                p = Process.getCurrentProcess 
     13                kb = 1024 
     14                mb = kb * kb 
     15                trace GC.getTotalMemory(false) / mb 
     16                trace p.privateMemorySize64 / mb 
     17                trace p.workingSet64 / mb 
     18}}} 
     19 
     20== See Also == 
     21 
     22 * CobraCookbook 
     23 * http://stackoverflow.com/questions/31096/process-memory-size-different-counters