Re: Cache or memory pools in java
- From: Piotr Kobzda <pikob@xxxxxxxxx>
- Date: Wed, 23 May 2007 19:48:51 +0200
Dlugi wrote:
I know this standard (JCache) but that implementation take 1 second per 1MB when evaluate how many size entries occupy in the memory :/
Hmm, maybe instrumentation could help?
Simple example on how to compute approximated object size is there:
http://tinyurl.com/hfzzu
(notice the correction from a post next to it)
Accuracy of that method is much better than with serialization, and efficiency is not so bad I think.
For example, on my machine ArrayList filled with 1000000 new Objects consumes about 14MB of memory, and computation of its size takes about 1.5 sec.
piotr
.
- References:
- Cache or memory pools in java
- From: Dlugi
- Re: Cache or memory pools in java
- From: B
- Re: Cache or memory pools in java
- From: Dlugi
- Cache or memory pools in java
- Prev by Date: Re: Entertaining Java Programs
- Next by Date: Re: read and show CSV-files
- Previous by thread: Re: Cache or memory pools in java
- Next by thread: Re: Cache or memory pools in java
- Index(es):
Relevant Pages
|