{"id":35,"date":"2010-03-04T00:00:57","date_gmt":"2010-03-03T23:00:57","guid":{"rendered":"http:\/\/blog.rewolf.pl\/blog\/?p=35"},"modified":"2015-05-25T19:03:12","modified_gmt":"2015-05-25T17:03:12","slug":"when-memory-management-goes-bad","status":"publish","type":"post","link":"http:\/\/blog.rewolf.pl\/blog\/?p=35","title":{"rendered":"When memory management goes bad&#8230;"},"content":{"rendered":"<p><strong>Post moved from OpenRCE, original date: Thursday, March 4 2010<\/strong><\/p>\n<p style=\"text-align: justify;\">Few months ago I&#8217;ve encountered a strange behavior in cmd.exe when I wanted to list some big collection of files and execute some command on every single file. I used for this task &#8216;for&#8217; command similar to this:<br \/>\n<code><br \/>\nfor \/R c:\\ %c in (*.*) do echo %c &gt;&gt; cmd_ptc.log<br \/>\n<\/code><\/p>\n<p>After few hours of processing I get a very disturbing message:<br \/>\n<code><br \/>\n\"Not enough storage is available to process this command.\"<br \/>\n<\/code><\/p>\n<p style=\"text-align: justify;\">Actually cmd.exe can eat all memory available for the process. I decided to check why it needs such amount of memory and if it will be possible fix it. Below you can find link to the full article and package with the fixed binaries (from Windows Vista SP2, password: rewolf.pl):<\/p>\n<p><a href=\"http:\/\/rewolf.pl\/stuff\/rewolf_cmd_research.pdf\">http:\/\/rewolf.pl\/stuff\/rewolf_cmd_research.pdf<\/a> &#8211; <em>article<\/em><br \/>\n<a href=\"http:\/\/rewolf.pl\/stuff\/rewolf_cmd_research.zip\">http:\/\/rewolf.pl\/stuff\/rewolf_cmd_research.zip<\/a> &#8211; <em>article and binaries<\/em><\/p>\n<p>Happy reading !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post moved from OpenRCE, original date: Thursday, March 4 2010 Few months ago I&#8217;ve encountered a strange behavior in cmd.exe when I wanted to list some big collection of files and execute some command on every single file. I used for this task &#8216;for&#8217; command similar to this: for \/R c:\\ %c in (*.*) do [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,3],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.rewolf.pl\/blog\/index.php?rest_route=\/wp\/v2\/posts\/35"}],"collection":[{"href":"http:\/\/blog.rewolf.pl\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.rewolf.pl\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.rewolf.pl\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.rewolf.pl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=35"}],"version-history":[{"count":6,"href":"http:\/\/blog.rewolf.pl\/blog\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":1268,"href":"http:\/\/blog.rewolf.pl\/blog\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions\/1268"}],"wp:attachment":[{"href":"http:\/\/blog.rewolf.pl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.rewolf.pl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.rewolf.pl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}