This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: serverside programs


On Thu, 18 Sep 2003, Erik Poupaert wrote:
> Another strategy could be to start and exit the program for every
> request (like cgi or xinetd programs). I was wondering, if the program
> has leaked memory during its execution, will the OS always and fully
> reclaim the memory not freed by the program after the program exits? Or
> in other words, is "exiting" always a full memory cleanup?

Yes.  When the program exits, the heap is gone, and its memory pages
become available for other processes.

Though it may be useful for a certain class of problems, this isn't the
typical execution model for Java though.  Java should excel at
long-running programs.

For our client we routinely run Java processes for six months or longer
continuously.  Heap growth has almost never been a serious problem.  We're
much more afraid of deadlock.  For example we have an application that
deadlocks on average once a month in a third-party closed-source package
we use, so we have no option but to accept the failures or serialize
every access to the library code.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]