<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6098392112071095875.post6333635688660474906..comments</id><updated>2009-07-09T06:51:07.384-04:00</updated><title type='text'>Comments on Code Instructions: The Size of a Boolean object in Java</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.codeinstructions.com/feeds/6333635688660474906/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html'/><author><name>Domingos Neto</name><uri>http://www.blogger.com/profile/16748499695622931125</uri><email>domingos.neto@gmail.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-6075174320338403573</id><published>2009-07-08T16:44:58.732-04:00</published><updated>2009-07-08T16:44:58.732-04:00</updated><title type='text'>I was looking for this info all over the place, th...</title><content type='html'>I was looking for this info all over the place, thanks a lot! I thought that it would simply be 1 byte, True, false&lt;br /&gt;&lt;br /&gt;http://www.blackravenplace.net</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/6075174320338403573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/6075174320338403573'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1247085898732#c6075174320338403573' title=''/><author><name>Serguei Fedorov</name><uri>http://www.blogger.com/profile/09144006721138130439</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-615359745532432509</id><published>2008-12-20T07:56:01.990-05:00</published><updated>2008-12-20T07:56:01.990-05:00</updated><title type='text'>Bytes can be addressed separately on most (all?) p...</title><content type='html'>Bytes can be addressed separately on most (all?) processor architectures so no atomic operations are necessary. Yet, non-aligned reads/writes are slower than aligned but it shall not be a big issue.&lt;BR/&gt;&lt;BR/&gt;Btw, creating new Booleans has another downside (aside memory consumption). Boolean has final field (value) and if the object doesn't fall in good escape analysis it will issue a memory fence (effective equal to writing of a volatile).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/615359745532432509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/615359745532432509'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229777761990#c615359745532432509' title=''/><author><name>Stanimir Simeonoff</name><uri>http://www.blogger.com/profile/15526543718385237177</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-8931028730852168137</id><published>2008-12-18T08:02:17.314-05:00</published><updated>2008-12-18T08:02:17.314-05:00</updated><title type='text'>It was quite some time ago, I think in a Java cert...</title><content type='html'>It was quite some time ago, I think in a Java certification book... But probably I am mis-remembering. Perhaps it was actually that four byte fields will take up the equivalent of just one int. I suppose this would make more sense given your explanation and that the JVM now does field re-ordering if it can...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/8931028730852168137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/8931028730852168137'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229605337314#c8931028730852168137' title=''/><author><name>Kieron Wilkinson</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-430658900147390398</id><published>2008-12-16T08:48:50.384-05:00</published><updated>2008-12-16T08:48:50.384-05:00</updated><title type='text'>Kieron, can you show the link where you read that....</title><content type='html'>Kieron, can you show the link where you read that.&lt;BR/&gt;Using more than a single boolean in a byte (or word) will require performing all the operations atomically (AND/OR for pure setting the value). e.g smth like:&lt;BR/&gt;LOCK OR ES:[EBX+xxx],2 to set the 2nd declared boolean to 'true'. Otherwise it risks to alter the values of all other packed booleans even if the thread otherwise never access them.&lt;BR/&gt;Using lock is not cheap on top of the necessary and/or/shl to transform into regular boolean.&lt;BR/&gt;Such approach (even though viable coding-wise) is bound to perform horrible.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/430658900147390398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/430658900147390398'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229435330384#c430658900147390398' title=''/><author><name>Stanimir Simeonoff</name><uri>http://www.blogger.com/profile/15526543718385237177</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-5470804786000088991</id><published>2008-12-15T07:55:54.639-05:00</published><updated>2008-12-15T07:55:54.639-05:00</updated><title type='text'>I once read that if you declare multiple (primitiv...</title><content type='html'>I once read that if you declare multiple (primitive) booleans next to each other in a class, they will be aligned and so only take up the memory required (i.e. declaring up to 32 booleans will take up 32 bits on a 32-bit CPU).&lt;BR/&gt;&lt;BR/&gt;I'd say the JVM is pretty damn clever really.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/5470804786000088991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/5470804786000088991'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229345754639#c5470804786000088991' title=''/><author><name>Kieron Wilkinson</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-5151544326643871125</id><published>2008-12-15T02:37:02.147-05:00</published><updated>2008-12-15T02:37:02.147-05:00</updated><title type='text'>Once more the statement that boolean (not object) ...</title><content type='html'>Once more the statement that boolean (not object) takes one byte of memory has never been true under any known implementation (at least to me). It has always had a size of int (+the byte alignment). Otherwise boolean would have had horrid performance. &lt;BR/&gt;&lt;BR/&gt;boolean[] however do take only a single byte, yet not just a single bit (to represent a single boolean, e.g. new boolean[7] takes 7 bytes+array object header+byte alignment (one extra byte most likely)).&lt;BR/&gt;&lt;BR/&gt;In that aspect boolean and Boolean (when replaced w/ a constant like Boolean.TRUE or Boolean.FALSE or simple autoboxing) do take the same amount of memory [provided the constant memory allocation is taken forever being part of the bootstrap classes]. However, boolean[] and Boolean[] are not the same. Yet, if you need low-mem boolean[] (not very high performance, though) you shall resort on java.util.BitSet most of the time. (just bit ops for int/long is also an option)&lt;BR/&gt;&lt;BR/&gt;cheers</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/5151544326643871125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/5151544326643871125'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229326622147#c5151544326643871125' title=''/><author><name>Stanimir Simeonoff</name><uri>http://www.blogger.com/profile/15526543718385237177</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-7505032420948655061</id><published>2008-12-14T21:49:00.983-05:00</published><updated>2008-12-14T21:49:00.983-05:00</updated><title type='text'>developmentech, the point is not about 15 bytes, I...</title><content type='html'>developmentech, the point is not about 15 bytes, I chose boolean because it is an extreme example, but it holds true to any other primitive wrapper.&lt;BR/&gt;&lt;BR/&gt;Most people write high level code in Java, and for these people it doesn't really matter, because their code is buried below too many levels of abstractions and so many layers of frameworks that there is no point in trying to optimize away one reference.&lt;BR/&gt;&lt;BR/&gt;Now, if you are writing high performance software, without layers of JSP and remote calls and proxies and templates, that's when you need to start thinking about writing high performance code.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/7505032420948655061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/7505032420948655061'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229309340983#c7505032420948655061' title=''/><author><name>Domingos Neto</name><uri>http://www.blogger.com/profile/16748499695622931125</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12246346859864848255'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-4082960611321042884</id><published>2008-12-14T19:51:11.330-05:00</published><updated>2008-12-14T19:51:11.330-05:00</updated><title type='text'>on 64bit architecture it takes even more, what's t...</title><content type='html'>on 64bit architecture it takes even more, what's the point?&lt;BR/&gt;Booleans are rarely instantiated and often that can be optimized by Hotspot. Short lived objects have not been an issue for quite a long time now.&lt;BR/&gt;And autoboxing never creates boolean objects anyways.&lt;BR/&gt;&lt;BR/&gt;Integer takes as much memory as Boolean too.&lt;BR/&gt;Strings and char[] are usually one of the greatest memory eaters, concentrate there.&lt;BR/&gt;&lt;BR/&gt;cheers</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/4082960611321042884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/4082960611321042884'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229302271330#c4082960611321042884' title=''/><author><name>Stanimir Simeonoff</name><uri>http://www.blogger.com/profile/15526543718385237177</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-7426521449815305316</id><published>2008-12-14T11:19:08.459-05:00</published><updated>2008-12-14T11:19:08.459-05:00</updated><title type='text'>1 byte vs. 16? in today's world where ordinary mac...</title><content type='html'>1 byte vs. 16? in today's world where ordinary machines have their memory measure in gigabytes, you are going to quibble over 15 bytes? really?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/7426521449815305316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/7426521449815305316'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229271548459#c7426521449815305316' title=''/><author><name>developmentech</name><uri>http://developmentech.wordpress.com/</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-7691234507514029719</id><published>2008-12-14T05:52:26.088-05:00</published><updated>2008-12-14T05:52:26.088-05:00</updated><title type='text'>Should a boolean value not just consume 1 BIT of m...</title><content type='html'>Should a boolean value not just consume 1 BIT of memory? &lt;BR/&gt;&lt;BR/&gt;Other question: Does the BitArray get rid of the Java Overhead for each bit?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/7691234507514029719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/7691234507514029719'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229251946088#c7691234507514029719' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-2609532401782673490</id><published>2008-12-13T06:24:24.818-05:00</published><updated>2008-12-13T06:24:24.818-05:00</updated><title type='text'>Auto-boxing will help reduce the amount of boiler ...</title><content type='html'>Auto-boxing will help reduce the amount of boiler plate code. Just be careful of null referenced objects!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/2609532401782673490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/2609532401782673490'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229167464818#c2609532401782673490' title=''/><author><name>roopinder</name><uri>http://www.blogger.com/profile/09390446639238525822</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-2477897794713189341</id><published>2008-12-12T15:59:58.487-05:00</published><updated>2008-12-12T15:59:58.487-05:00</updated><title type='text'>More along Sam Beran's lines, wouldn't all boolean...</title><content type='html'>More along Sam Beran's lines, wouldn't all booleans in any JVM take up a grand total of about 32kb then?  Why would the JVM instantiate more than two booleans?  Any instance of a boolean within your program can simply be a reference to one of these two objects.&lt;BR/&gt;&lt;BR/&gt;I know this to be true for Integers if done the way Sam said.  For example new Integer(1) creates a new Integer object.  However Integer.valueOf(1) will re-use an integer already instantiated with this value from the object pool.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/2477897794713189341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/2477897794713189341'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229115598487#c2477897794713189341' title=''/><author><name>Danny</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-6669167164473837189</id><published>2008-12-12T13:40:52.005-05:00</published><updated>2008-12-12T13:40:52.005-05:00</updated><title type='text'>Eclipse generates a warning when you instantiate a...</title><content type='html'>Eclipse generates a warning when you instantiate a Boolean for this very reason. Nobody should ever instantiate a Boolean. The constructor for Boolean should have been private.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/6669167164473837189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/6669167164473837189'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229107252005#c6669167164473837189' title=''/><author><name>Sam Beran</name><uri>http://www.blogger.com/profile/17110830244342766454</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-5011909863785921321</id><published>2008-12-12T13:26:02.211-05:00</published><updated>2008-12-12T13:26:02.211-05:00</updated><title type='text'>Do you know how much memory datebase connection ta...</title><content type='html'>Do you know how much memory datebase connection takes? dont use datebase, use local files.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/5011909863785921321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/5011909863785921321'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229106362211#c5011909863785921321' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-5450430695524511012</id><published>2008-12-12T13:04:08.175-05:00</published><updated>2008-12-12T13:04:08.175-05:00</updated><title type='text'>That primitive field in your class will probably t...</title><content type='html'>That primitive field in your class will probably take up 4 bytes or 8 bytes depending on the JVM because class fields get aligned too.  And it's not "fat Java", just about every language does this by default because it's faster to access memory this way.&lt;BR/&gt;&lt;BR/&gt;If you're worried about wasting memory with multiple booleans (frankly in most applications it is asinine to worry about this) use a boolean array or an EnumSet.&lt;BR/&gt;&lt;BR/&gt;So you can save a tiny bit of memory and be a tiny bit slower or you can use a tiny bit of memory and be a tiny bit faster.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/5450430695524511012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/5450430695524511012'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229105048175#c5450430695524511012' title=''/><author><name>Mike Heath</name><uri>http://www.blogger.com/profile/12802434762732581606</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-7682481548942688580</id><published>2008-12-12T13:02:45.560-05:00</published><updated>2008-12-12T13:02:45.560-05:00</updated><title type='text'>Measuring memory used is indeed a very difficult t...</title><content type='html'>Measuring memory used is indeed a very difficult thing to do.&lt;BR/&gt;&lt;BR/&gt;I have written an article about &lt;A HREF="http://messadmin.sourceforge.net/#%5B%5BHttpSession%20size%5D%5D" REL="nofollow"&gt;measuring the size of an HttpSession&lt;/A&gt;. Hint: it is much more complicated than what you think...&lt;BR/&gt;&lt;BR/&gt;Shameless plug: measuring HttpSession sizes is a very small amount of the information provided by &lt;A HREF="http://messadmin.sourceforge.net/" REL="nofollow"&gt;MessAdmin&lt;/A&gt;, my open-source monitoring utility. Check it out, you will like it! :-)&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;@bbennett&lt;BR/&gt;java.util.BitSet is the class you're looking for...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/7682481548942688580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/7682481548942688580'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229104965560#c7682481548942688580' title=''/><author><name>Cédrik</name><uri>http://messadmin.sourceforge.net</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-1197448932336120563</id><published>2008-12-12T12:57:12.666-05:00</published><updated>2008-12-12T12:57:12.666-05:00</updated><title type='text'>Argh! If the class had up to 8 boolean fields decl...</title><content type='html'>Argh! If the class had up to 8 boolean fields declared it should use one byte only!&lt;BR/&gt;Fat java; very fat!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/1197448932336120563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/1197448932336120563'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229104632666#c1197448932336120563' title=''/><author><name>bbennett</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-5384613941399427932</id><published>2008-12-12T09:09:23.505-05:00</published><updated>2008-12-12T09:09:23.505-05:00</updated><title type='text'>i find the idea of using Boolean.TRUE and Boolean....</title><content type='html'>i find the idea of using Boolean.TRUE and Boolean.FALSE very nice. it avoids having lots of Boolean wrappers in memory, and you get to keep the null semantics.&lt;BR/&gt;&lt;BR/&gt;also, i agree that sometimes using the primitive instead of the wrapper can make a HUGE difference, depending on your application design...&lt;BR/&gt;&lt;BR/&gt;nice article!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/5384613941399427932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6333635688660474906/comments/default/5384613941399427932'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html?showComment=1229090963505#c5384613941399427932' title=''/><author><name>marcelo</name><uri>http://www.blogger.com/profile/08717961348044342748</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/size-of-boolean-object-in-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6333635688660474906' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6333635688660474906' type='text/html'/></entry></feed>