<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>It's only temporary</title><link>http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx</link><description>NT has a whole lot of really cool features that aren’t always obvious without REALLY looking closely at the documentation. One of my favorite is what I call “temporary” temporary files. A “temporary” temporary file is one whose storage is never written</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: It's only temporary</title><link>http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx#116138</link><pubDate>Mon, 19 Apr 2004 19:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:116138</guid><dc:creator>Chris</dc:creator><description>Hmm. In Unix-based systems such as OS X, this is done by creating a file in /tmp, opening the file (usually create and open are combined into one atomic step) and then deleting the file. The file will remain in memory until it is closed.</description></item><item><title>re: It's only temporary</title><link>http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx#116186</link><pubDate>Mon, 19 Apr 2004 20:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:116186</guid><dc:creator>Larry Osterman</dc:creator><description>So the *nix filesystems and cache manager treat the /tmp portion of the namespace specially?  &lt;br&gt;&lt;br&gt;Or is because the inode's been unlinked that makes it behave specially?  What happens if the system comes under memory pressure and the file metadata needs to be flushed to disk?&lt;br&gt;&lt;br&gt;</description></item><item><title>re: It's only temporary</title><link>http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx#116357</link><pubDate>Tue, 20 Apr 2004 01:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:116357</guid><dc:creator>byron</dc:creator><description>what chris is talking about is different.&lt;br&gt;&lt;br&gt;first, /tmp isn't special.&lt;br&gt;&lt;br&gt;if you unlink an open file, the file isn't deleted from disk until the file is closed.  basically all it does is remove the file from the directory's file, so it only exists in the inode allocation tables.&lt;br&gt;&lt;br&gt;it doesn't cause the file to live in ram, etc.&lt;br&gt;&lt;br&gt;basically there's no need to clean up your temp files.&lt;br&gt;</description></item><item><title>re: It's only temporary</title><link>http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx#116465</link><pubDate>Tue, 20 Apr 2004 03:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:116465</guid><dc:creator>Larry Osterman</dc:creator><description>Thanks Byron, I appreciate it.&lt;br&gt;&lt;br&gt;So the unlink does the equivilant of the FILE_FLAG_DELETE_ON_CLOSE, but not the combination of the two (which is what gets you the &amp;quot;never flushed to disk unless necessary&amp;quot;)?&lt;br&gt;</description></item><item><title>re: It's only temporary</title><link>http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx#116543</link><pubDate>Tue, 20 Apr 2004 06:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:116543</guid><dc:creator>byron</dc:creator><description>yup, that's correct.</description></item><item><title>re: It's only temporary</title><link>http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx#117171</link><pubDate>Tue, 20 Apr 2004 23:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:117171</guid><dc:creator>Michael Grier</dc:creator><description>unlink is superior to FILE_FLAG_DELETE_ON_CLOSE because:&lt;br&gt;&lt;br&gt;1. The name is gone from the directory immediately.  With the NT delete model, the deletion doesn't occur until the last handle to the file object is closed.&lt;br&gt;&lt;br&gt;2. Someone can't go and change the delete-on-close attibute on the handle behind your back (in case you didn't know, if someone else has a handle on your delete-on-close file, they can set it back to not be delete-on-close.&lt;br&gt;&lt;br&gt;The two of these together make life a living hell for installation programs.&lt;br&gt;</description></item><item><title>re: It's only temporary</title><link>http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx#117539</link><pubDate>Wed, 21 Apr 2004 15:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:117539</guid><dc:creator>Larry Osterman</dc:creator><description>As usual, insiteful comment, Mike.&lt;br&gt;</description></item><item><title>re: It's only temporary</title><link>http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx#117610</link><pubDate>Wed, 21 Apr 2004 17:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:117610</guid><dc:creator>smee</dc:creator><description>Hm, &amp;quot;inciteful&amp;quot; or &amp;quot;insightful&amp;quot; ;)</description></item><item><title>Measure Twice, Optimize  Once</title><link>http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx#125199</link><pubDate>Mon, 03 May 2004 22:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:125199</guid><dc:creator>Larry Osterman's WebLog</dc:creator><description /></item></channel></rss>