• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best way to monitor app memory usage...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to monitor app memory usage...


  • Subject: Re: Best way to monitor app memory usage...
  • From: Helge Städtler <email@hidden>
  • Date: Thu, 21 Jul 2005 21:45:54 +0200

you could attach a professional debugger...

...or just add these lines in one of the appendToResponse-methods (e.g. in
your component, session, ...)


        System.out.println( "MEMORY-STATUS\n" );
        Runtime rt = Runtime.getRuntime();
        System.out.println( "BEFORE rt.gc()" );
        long free = rt.freeMemory();
        long total = rt.totalMemory();
        long percent = (100*free)/total;
        System.out.println( "freemem: "+free+" totalmem: "+total+" (
"+percent+" % free)" );
        rt.gc(); // free up some memory
        System.out.println( "AFTER rt.gc()" );
        free = rt.freeMemory();
        total = rt.totalMemory();
        percent = (100*free)/total;
        System.out.println( "freemem: "+free+" totalmem: "+total+" (
"+percent+" % free)\n" );


regards,
helge



Am 21.07.2005 19:45 Uhr schrieb "Nathan Walker" unter
<email@hidden> / On 21.07.2005 19:45 Uhr "Nathan Walker" wrote
using address <email@hidden>:

> While developing an application, what's the best way to monitor how
> much memory the application is consuming?
>
> Thanks,
> Nathan
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Best way to monitor app memory usage...
      • From: Nathan Walker <email@hidden>
References: 
 >Best way to monitor app memory usage... (From: Nathan Walker <email@hidden>)

  • Prev by Date: Re: default editing context locking in directaction
  • Next by Date: Re: Best way to monitor app memory usage...
  • Previous by thread: Best way to monitor app memory usage...
  • Next by thread: Re: Best way to monitor app memory usage...
  • Index(es):
    • Date
    • Thread