Results 1 to 2 of 2
Thread: Memory pool in file handling?
- 05-10-2011, 07:57 AM #1
Member
- Join Date
- Jan 2011
- Location
- NewYork
- Posts
- 13
- Rep Power
- 0
Memory pool in file handling?
Hi,
I have an issue with lots of memory allocation/freeing in my program because of which JVM GC gets pretty hectic after some time and that leads to huge delays in application run time.
I guess it can be overcome by using a global memory pool of objects(separate pool for each object) which can be reused again and again. But I am currently using a cache for the objects and the cache manager loads objects from disk to memory using ObjectInputStream.readObject(). For such cases I do not have control on letting java reuse some object from my memory pool.
Is there any workaround for this?
- 05-11-2011, 11:14 AM #2
Member
- Join Date
- Apr 2011
- Posts
- 69
- Rep Power
- 0
Hi
Just throwing ideas here but i often use thread pooling and connection pooling for the very same reason, avoid constant thread/connection creation/destruction and optimize memory usage and performance. Perhaps you could implement a stream pool to achieve the same results? You would only have to open let's say 5 streams at execution and constantly reuse them until the program is stopped.
Similar Threads
-
File handling
By Dayanand in forum New To JavaReplies: 7Last Post: 03-23-2011, 07:31 AM -
File handling
By Dayanand in forum New To JavaReplies: 1Last Post: 03-22-2011, 07:07 PM -
File handling
By Dayanand in forum New To JavaReplies: 3Last Post: 03-22-2011, 04:20 PM -
File handling
By Claude2005 in forum New To JavaReplies: 17Last Post: 09-21-2010, 11:49 AM -
handling WAV file
By zellazode in forum New To JavaReplies: 1Last Post: 09-08-2009, 03:46 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks