Forum Discussion

Tarzan1990's avatar
Tarzan1990
Occasional Contributor
7 years ago

Hi, For memory leakage test which technique is better

Hi

 

for memory leakage test of deaktop application which technique is better(w.r.t speed and accuracy)

 

A] Telnet connecting to local host and running "GCFLUSH" to read the memory usage

B] Reading Sys.Process("AppProcessName").MemUsage

 

Thanks

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    I would recommend profiling tool that is specially designed for such tasks. AQtime (https://smartbear.com/product/aqtime-pro/overview/) is a great tool that I don't see the reason not to try.

    Monitoring the things like Sys.Process("AppProcessName").MemUsage are not really useful because they provide you with the aggregated information about the memory requested from OS by memory manager. This memory may be used by your application for different tasks and not necessarily is immediately returned to the system when released by your application but may remain reserved for your application for possible future use. For example, your application may request a big chunk of memory to process significant data amount. This is correct behavior and should not be considered as a memory leak. But .MemUsage (if you are lucky to call it at proper time) will just show you that the memory was consumed without any additional info of when and what for this was done.

    Another example is a server application that is supposed to run for weeks without restart. If it leaks just a dozen of bytes, your test must be running for a really long time in order to notice this leak via .MemUsage.

    AQtime solves these problems much more easily and conveniently. Forum: https://community.smartbear.com/t5/AQtime/bd-p/AQTime