tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nishant Kumar <ntom...@postmark.net>
Subject why does tomcat recycle objects
Date Fri, 20 Jun 2003 12:29:03 GMT
hi,
	i was going through this link
http://java.sun.com/docs/hotspot/PerformanceFAQ.html

and found the follwing

Many systems have less efficient memory management than in HotSpot. To
work around this, some programs keep an "object pool", saving previously
allocated objects in some freelist-like data structure and reusing them
instead of allocating new ones. But... Don't use object pools! Using
object pools will fool the collector into thinking objects are live when
they really aren't. This may have worked before exact garbage collection
became popular (in the 1.x systems), but this is just not a good idea
for any modern Java Virtual Machines.

Should I pool objects to help GC?

Pooling objects will cause them to live longer than necessary. The
garbage collection methods will be much more efficient if you let it do
the memory management. We strongly advise taking out object pools.

----------------------------------------------------------------------
tomcat does pool everything. request, response, processor etc.

is this required if i am going to run tomcat on java 1.3 or 1.4??

thanks,
nishant.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message