Skip site navigation (1) Skip section navigation (2)

Re: possible memory leak??

From: "Michael Paesold" <mpaesold(at)gmx(dot)at>
To: "Dave Cramer" <Dave(at)micro-automation(dot)net>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: possible memory leak??
Date: 2002-11-08 14:23:22
Message-ID: 017101c28732$652281b0$4201a8c0@beeblebrox (view raw or flat)
Thread:
Lists: pgsql-jdbc
Dave Cramer <Dave(at)micro-automation(dot)net> wrote:

> Should the gc run before an OutOfMemoryException is thrown
>
> in other words are the jvm's smart enough to run the gc if they are out
> of memory?

Yes, the jvm should be smart enough to regain unused memory before throwing
an OutOfMemoryException. The global gc runs in the backround in defined
intervals, but more often in low memory situations, as far as I know.

It is possible to have "memory leaks" in java, but I don't see it in your
code. Such a "leak" could be created by adding all result sets to a vector
without ever removing it.

Does the overall memory consumption increase, even with System.gc() called
explicitly? Have you tried running it until the jvm needs more than maximum
allowed memory? (the limit can be set with command line arguments)

Regards,
Michael Paesold


In response to

Responses

pgsql-jdbc by date

Next:From: Alex DovlecelDate: 2002-11-08 14:30:32
Subject: Re: JDBC driver problem ?
Previous:From: Mike BeachyDate: 2002-11-08 14:20:04
Subject: Re: possible memory leak??

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group