<?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.post6655298225324435949..comments</id><updated>2011-01-14T17:25:39.862-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: A Memory Problem With Java IO</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.codeinstructions.com/feeds/6655298225324435949/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.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>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-3753175035064718881</id><published>2009-08-28T17:03:06.604-04:00</published><updated>2009-08-28T17:03:06.604-04:00</updated><title type='text'>I&amp;#39;m interested in why the JVM copies the byte ...</title><content type='html'>I&amp;#39;m interested in why the JVM copies the byte array, instead of using the original one.&lt;br /&gt;since the IO call doesn&amp;#39;t return till all of the data was written to the IO pipe, what the copy is needed for? Another thread might tamper with the byte array? that&amp;#39;s the responsibility of the user to avoid from such acts. Any idea?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/3753175035064718881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/3753175035064718881'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html?showComment=1251493386604#c3753175035064718881' title=''/><author><name>Gili Nachum</name><uri>http://www.blogger.com/profile/16996461994293511014</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://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6655298225324435949' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6655298225324435949' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-132143578'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-8546416209578900862</id><published>2009-02-02T08:21:00.000-05:00</published><updated>2009-02-02T08:21:00.000-05:00</updated><title type='text'>This is really useful, thanks :-)</title><content type='html'>This is really useful, thanks :-)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/8546416209578900862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/8546416209578900862'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html?showComment=1233580860000#c8546416209578900862' title=''/><author><name>Ian</name><uri>http://www.blogger.com/profile/01391154056676404850</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://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6655298225324435949' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6655298225324435949' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-458908341'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-6003875053006078288</id><published>2009-01-31T20:07:00.000-05:00</published><updated>2009-01-31T20:07:00.000-05:00</updated><title type='text'>William: about the majority of the OOM errors bein...</title><content type='html'>William: about the majority of the OOM errors being caused by memory capacity issues: you are totally right :)&lt;BR/&gt;&lt;BR/&gt;William: the problem was exactly that we weren't writing the array in chunks.  Since we had the whole array at hand, it was simpler to just call out.write(array) only once, which caused the memory error. The solution was to do exactly as you suggested.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/6003875053006078288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/6003875053006078288'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html?showComment=1233450420000#c6003875053006078288' 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/2009/01/memory-problem-with-java-io.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6655298225324435949' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6655298225324435949' 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-1339337072601920188</id><published>2009-01-30T08:28:00.000-05:00</published><updated>2009-01-30T08:28:00.000-05:00</updated><title type='text'>By the way I still do not understand what exactly ...</title><content type='html'>By the way I still do not understand what exactly the cause is. Even if the byte array is relatively large (5M) , which is a problem (waste) in itself, every IO class allows one to specify a range in the writing.&lt;BR/&gt;&lt;BR/&gt;Kind regards,&lt;BR/&gt;&lt;BR/&gt;William</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/1339337072601920188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/1339337072601920188'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html?showComment=1233322080000#c1339337072601920188' title=''/><author><name>William Louth</name><uri>http://www.blogger.com/profile/00414063535114178838</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://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6655298225324435949' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6655298225324435949' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-581307503'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-6016388869372543753</id><published>2009-01-30T08:24:00.000-05:00</published><updated>2009-01-30T08:24:00.000-05:00</updated><title type='text'>"The process of fixing it usually involves profili...</title><content type='html'>"The process of fixing it usually involves profiling the memory in search for memory leaks, which can be very time consuming."&lt;BR/&gt;&lt;BR/&gt;Not all out memory errors are related to memory leaks. In fact a significantly large portion are just memory capacity issues due to a relative high number of concurrent memory hungry (alloc) requests.&lt;BR/&gt;&lt;BR/&gt;William</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/6016388869372543753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/6016388869372543753'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html?showComment=1233321840000#c6016388869372543753' title=''/><author><name>William Louth</name><uri>http://www.blogger.com/profile/00414063535114178838</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://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6655298225324435949' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6655298225324435949' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-581307503'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-3768785881800084774</id><published>2009-01-29T19:43:00.000-05:00</published><updated>2009-01-29T19:43:00.000-05:00</updated><title type='text'>Pablo: we were actually using it, but the Buffered...</title><content type='html'>Pablo: we were actually using it, but the BufferedOutputStream bypasses itself if the data being written is larger than its internal buffer, which kind of makes sense :)  If its purpose is to save the number of writes to the underlying stream, why should it make more calls when it receives a large input? :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/3768785881800084774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/3768785881800084774'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html?showComment=1233276180000#c3768785881800084774' 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/2009/01/memory-problem-with-java-io.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6655298225324435949' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6655298225324435949' 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-3736756209901020308</id><published>2009-01-29T19:02:00.000-05:00</published><updated>2009-01-29T19:02:00.000-05:00</updated><title type='text'>vrg: it could work in a general case but probably ...</title><content type='html'>vrg: it could work in a general case but probably in my situation it would also cause problems because the process address space was almost exhausted, but it is something worth considering!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/3736756209901020308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/3736756209901020308'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html?showComment=1233273720000#c3736756209901020308' 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/2009/01/memory-problem-with-java-io.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6655298225324435949' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6655298225324435949' 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-1637398883391457517</id><published>2009-01-29T13:59:00.000-05:00</published><updated>2009-01-29T13:59:00.000-05:00</updated><title type='text'>Meant 8KB, sorry</title><content type='html'>Meant 8KB, sorry</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/1637398883391457517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/1637398883391457517'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html?showComment=1233255540000#c1637398883391457517' title=''/><author><name>Pablo</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/2009/01/memory-problem-with-java-io.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6655298225324435949' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6655298225324435949' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1707141507'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-8508870830402058179</id><published>2009-01-29T13:58:00.000-05:00</published><updated>2009-01-29T13:58:00.000-05:00</updated><title type='text'>Haven't you tried using a BufferedOutputStream? Th...</title><content type='html'>Haven't you tried using a BufferedOutputStream? That way you can write as much bytes as you want, but only be written to the file at 9KB chunks</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/8508870830402058179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/8508870830402058179'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html?showComment=1233255480000#c8508870830402058179' title=''/><author><name>Pablo</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/2009/01/memory-problem-with-java-io.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6655298225324435949' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6655298225324435949' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1144439477'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-2696590575800985375</id><published>2009-01-29T03:24:00.000-05:00</published><updated>2009-01-29T03:24:00.000-05:00</updated><title type='text'>I think there is another solution: the nio MappedB...</title><content type='html'>I think there is another solution: the nio MappedByteBuffer. What do you think?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/2696590575800985375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/6655298225324435949/comments/default/2696590575800985375'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html?showComment=1233217440000#c2696590575800985375' title=''/><author><name>vrg</name><uri>http://www.blogger.com/profile/13688293446663328094</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://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/01/memory-problem-with-java-io.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-6655298225324435949' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/6655298225324435949' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1209622324'/></entry></feed>
