<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
BCHM creates segment array and for each segment it creates HashEntry
array just like the ConcurrentHashMap. The difference is that BCHM
has EvictionPolicy instance per segment. <br>
<br>
On 11-01-20 1:01 PM, david marion wrote:
<blockquote cite="mid:col113-w24FE2DE9C1BEE7658AED13D1F90@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
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: <a class="moz-txt-link-abbreviated" href="mailto:vblagoje@redhat.com">vblagoje@redhat.com</a><br>
To: <a class="moz-txt-link-abbreviated" href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><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 <a class="moz-txt-link-abbreviated" href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
infinispan-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></pre>
</blockquote>
<br>
</body>
</html>