Jump to content
Changes to the Jaspersoft community edition download ×

Memeory leakage


2005 IR Help

Recommended Posts

By: karthika - karthika

Memeory leakage

2004-06-25 23:03

Jasper report does'nt freeing the memory.it means that jasper report has some meory leakage

 

 

 

 

By: Teodor Danciu - teodord

RE: Memeory leakage

2004-06-27 01:05

 

Hi,

 

Have you used any kind of profiling tools to detect

such memory leakage if any?

 

If not, make sure you give enough memory to your

JVM by setting the -Xmx command line switch.

 

Thank you,

Teodor

 

 

 

 

 

By: karthika - karthika

RE: Memeory leakage

2004-06-27 23:02

I am not using any profiler.But I could see in task manager.After generating the report it does'nt freeing the memory and cpu usage is still 100%

 

 

 

 

By: Chuck Deal - cdeal

RE: Memeory leakage

2004-06-28 09:46

I see that you mentioned Task Manager. I am assuming then, that you are running Windows?

 

If so, I don't think the Task Manager is the most accurate way of determining memeory usage. The JVM is the memory mananager for your app, so if the JVM hits 64M it is going to look like the task is at 64M, when in fact, that is the MAX JVM size. You need to get a Handle to the Runtime object in your code. The following is a snippet that I have used:

 

Runtime rt = Runtime.getRuntime();

StringBuffer sb = new StringBuffer(64);

sb.append("Memory Used: ");

sb.append((rt.totalMemory() - rt.freeMemory()) / 1024);

sb.append("/");

sb.append(rt.totalMemory() / 1024);

sb.append("K");

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...