Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3220038
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:42:56+00:00 2026-05-17T15:42:56+00:00

i sampling the memory usage and count number of instances for POJO. if when

  • 0
  1. i sampling the memory usage and count number of instances for POJO. if when i press ‘garbage collecting’ in visual vm and i can see the instances down , does that mean it’s memory leak free ?

  2. how to force jvm do garbage collecting everyday at midgnight ? (just like automatically press garbage collect on visualvm) ? i see visualvm ‘s cpu usage, gc is always 0%. i set -xmx -xms 1024m, but normally memory usage around 200mb. is this because GC is only done when necessary? that’s why always 0% for gc cpu time

  3. how to check the time of last time doing ‘full GC’ ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:42:56+00:00Added an answer on May 17, 2026 at 3:42 pm
    1. No, not necessarily. All that really means is that some of your objects can be collected. You could still have a garbage leak if, for example, the instance count always went down after a GC but not quite to the same level as before; if this “baseline” increased over time you’d run out of memory occasionally. Also, it’s very hard to prove a negative, so it could be that your application does have a memory leak bug, but this specific situation isn’t exercising it.
    2. Let’s clarify one thing – you can never force the JVM to run garbage collection. The best you can do is call System.gc(), which is a hint to the JVM that it might want to run GC now. It doesn’t have to do anything, and a no-op implementation of that method would be perfectly valid. Basically, garbage collection “just happens” and the less you place specific expectations on it the better. So basically, yes, it will typically only run when needed.
    3. Again, this is typically internal knowledge and the details will depend on which garbage collector implementation you’re using. For Sun’s JVM, however, you can use the command-line argument -verbose:gc to get verbose garbage collection details output to the console. If you want to inspect the details programmatically or visually, this information might be exposed via JMX too (i.e. set up your process to use JMX remoting, and connect to it with JConsole). For me, using Sun’s 1.5.0_06 JVM, I see an MBean in java.lang.GarbageCollector that exposes some information including the time of the last full GC.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In anime, does frame means number of scene per second? Each scene can consist
Does windows have any decent sampling (eg. non-instrumenting) profilers available? Preferably something akin to
What is the best available tool to monitor the memory usage of my C#/.Net
Can anyone say how sampling rate and framesize are related ? I decoded a
Sampling with Activity Monitor/Instruments/Shark will show stack traces full of C functions for the
I'm used to sampling C-based apps, which every few milliseconds sees what function stack
I'm trying to select a random 10% sampling from a small table. I thought
Sampling drag-and-drop between WinForm RichTextBoxes within one application and between them and external applications
Sampling uniformly at random from an n-dimensional unit simplex is the fancy way to
Assume we're frequently sampling a particular value and want to keep statistics on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.