<?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.post7695342274879035914..comments</id><updated>2010-11-21T19:18:07.325-05:00</updated><category term='Hibernate'/><category term='Code'/><category term='Productivity'/><category term='Opinion'/><category term='Spring'/><category term='Performance'/><category term='Agile'/><category term='Java'/><category term='Scrum'/><title type='text'>Comments on Code Instructions: Sizeof for Java</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.codeinstructions.com/feeds/7695342274879035914/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html'/><author><name>Domingos Neto</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/_HHFrwTieqY8/STh7yQ1m0bI/AAAAAAAAABs/8BJWpydZgZ4/S220/cruzes.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-2685784822527682006</id><published>2008-12-23T11:01:00.000-05:00</published><updated>2008-12-23T11:01:00.000-05:00</updated><title type='text'>Stanimir:  that method looks like something I coul...</title><content type='html'>Stanimir:  that method looks like something I could use. Thanks!&lt;BR/&gt;&lt;BR/&gt;Do you know how I can use that method from inside a Java process without having to write an instrumentation agent?  It would make life much easier!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default/2685784822527682006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default/2685784822527682006'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html?showComment=1230048060000#c2685784822527682006' title=''/><author><name>Domingos Neto</name><uri>http://www.blogger.com/profile/16748499695622931125</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/_HHFrwTieqY8/STh7yQ1m0bI/AAAAAAAAABs/8BJWpydZgZ4/S220/cruzes.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-7695342274879035914' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/7695342274879035914' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1013888231'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-6919998827712176357</id><published>2008-12-23T11:00:00.000-05:00</published><updated>2008-12-23T11:00:00.000-05:00</updated><title type='text'>Cédrik, thanks for the info!&lt;br&gt;&lt;br&gt;I was aware of...</title><content type='html'>Cédrik, thanks for the info!&lt;BR/&gt;&lt;BR/&gt;I was aware of the existence of some of those implementations, but not all.&lt;BR/&gt;&lt;BR/&gt;But I was never intending to do something really useful: I just wanted to put the theory in the previous post in practice :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default/6919998827712176357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default/6919998827712176357'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html?showComment=1230048000000#c6919998827712176357' title=''/><author><name>Domingos Neto</name><uri>http://www.blogger.com/profile/16748499695622931125</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/_HHFrwTieqY8/STh7yQ1m0bI/AAAAAAAAABs/8BJWpydZgZ4/S220/cruzes.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-7695342274879035914' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/7695342274879035914' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1013888231'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-3286014541381022259</id><published>2008-12-22T18:08:00.000-05:00</published><updated>2008-12-22T18:08:00.000-05:00</updated><title type='text'>&lt;a href="http://java.sun.com/javase/6/docs/api/jav...</title><content type='html'>&lt;A HREF="http://java.sun.com/javase/6/docs/api/java/lang/instrument/Instrumentation.html#getObjectSize(java.lang.Object)" REL="nofollow"&gt;java.lang.instrument.Instrumentation.getObjectSize(Object objectToSize)&lt;BR/&gt;&lt;/A&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default/3286014541381022259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default/3286014541381022259'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html?showComment=1229987280000#c3286014541381022259' title=''/><author><name>Stanimir Simeonoff</name><uri>http://www.blogger.com/profile/15526543718385237177</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/__xTSSBstVk0/SUfd3h0rubI/AAAAAAAAD_8/ANdfXBixxHw/S220/stanimirInTheBoat.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-7695342274879035914' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/7695342274879035914' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1228361073'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-3424430257331688370</id><published>2008-12-19T06:35:00.000-05:00</published><updated>2008-12-19T06:35:00.000-05:00</updated><title type='text'>Great, one more implementation of sizeof() in Java...</title><content type='html'>Great, one more implementation of sizeof() in Java! :-)&lt;BR/&gt;&lt;BR/&gt;Others include (in no particular order):&lt;BR/&gt;NetBean's &lt;A HREF="http://performance.netbeans.org/insane/" REL="nofollow"&gt;Insane&lt;/A&gt; lib&lt;BR/&gt;&lt;A HREF="http://www.javaspecialists.eu/archive/Issue078.html" REL="nofollow"&gt;JavaSpecialist's take 1&lt;/A&gt;&lt;BR/&gt;&lt;A HREF="http://www.javaspecialists.eu/archive/Issue142.html" REL="nofollow"&gt;JavaSpecialist's take 2&lt;/A&gt;&lt;BR/&gt;&lt;A HREF="http://jroller.com/page/maxim?entry=again_about_determining_size_of" REL="nofollow"&gt;a blog entry&lt;/A&gt;&lt;BR/&gt;&lt;A HREF="http://sizeof.sourceforge.net/" REL="nofollow"&gt;SizeOf project (GPL)&lt;/A&gt;&lt;BR/&gt;&lt;A HREF="http://www.javaworld.com/javaqa/2003-12/02-qa-1226-sizeof_p.html" REL="nofollow"&gt;Vladimir Roubtsov's article&lt;/A&gt;&lt;BR/&gt;&lt;BR/&gt;There may be others I am not aware of... ;-)&lt;BR/&gt;&lt;BR/&gt;For the record, I am using a slightly modified version of Vladimir Roubtsov in &lt;A HREF="http://messadmin.sourceforge.net" REL="nofollow"&gt;MessAdmin&lt;/A&gt; to measure the size of an HttpSession.&lt;BR/&gt;&lt;BR/&gt;That said, your implementation is one of first to take into account memory alignment and 32/64 bit architecture. I may very well switch to your implementation, as we have compatible licenses. In the meantime, you may be interested to have a look at MessAdmin's source code to learn about some edge cases (read bugs) that can trigger bad things when reflecting on some objects. Contact me by email for more details.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default/3424430257331688370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default/3424430257331688370'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html?showComment=1229686500000#c3424430257331688370' title=''/><author><name>Cédrik</name><uri>http://messadmin.sourceforge.net</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-7695342274879035914' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/7695342274879035914' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1213796692'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-3414526251678507543</id><published>2008-12-19T06:20:00.000-05:00</published><updated>2008-12-19T06:20:00.000-05:00</updated><title type='text'>Nice work Domingos.</title><content type='html'>Nice work Domingos.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default/3414526251678507543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/7695342274879035914/comments/default/3414526251678507543'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html?showComment=1229685600000#c3414526251678507543' title=''/><author><name>Jorge Ferreira</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2008/12/sizeof-for-java.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-7695342274879035914' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/7695342274879035914' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-675167805'/></entry></feed>
