<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Yes, but its because I changed the meaning of maxEntries == -1. It used to create a ConcurrentHashMap that has a max size of 2^30. In my fork, when -1 is used it creates a BoundedConcurrentHashMap with a max size of 2^30. My guess is that a ConcurrentHashMap grows as items are placed into the map, whereas the BoundedConcurrentHashMap pre-allocates structures for that designated size. So, I am thinking that I need to account for the size of the JVM to determine the maximum entries for the BoundedConcurrentHashMap. <BR> <BR>
<HR id=stopSpelling>
Date: Thu, 20 Jan 2011 12:34:22 -0300<BR>From: vblagoje@redhat.com<BR>To: infinispan-dev@lists.jboss.org<BR>Subject: Re: [infinispan-dev] ISPN-863 - Thoughts / Questions<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>On 11-01-20 9:52 AM, david marion wrote:
<BLOCKQUOTE cite=mid:COL113-W385C1BE2A00CA58418309FD1F90@phx.gbl>
<STYLE>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</STYLE>
I did exactly that last night. I built a test that allocated HashEntry<K,V>[] just like it does in the Segment constructor. I don't have the numbers in front of me right now, but at the maximum size (2^30) and without specifying concurrency it was trying to allocate 32 Segment objects each having a HashEntry<K,V>[] with 2^25 elements. Each one of these HashEntry<K,V>[] takes up around 128MB of memory.<BR></BLOCKQUOTE>Ok, let me just make sure I understand you. You are saying that BCHM is allocating too much memory if a certain constructor is used? <BR><BR>_______________________________________________ infinispan-dev mailing list infinispan-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/infinispan-dev                                            </body>
</html>