<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fortran66</author_name>
  <author_url>https://blog.hatena.ne.jp/fortran66/</author_url>
  <blog_title>fortran66のブログ</blog_title>
  <blog_url>https://fortran66.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>stack か static か block 構文内部で宣言される変数は stack に確保されるので、大きな配列を取ると実行時に stack overflow が出ます。 しかしながら、配列に初期値を与えると Fortran の罠で save オプションが自動的につくので、配列が静的に確保され stack を使わなくなるので、実行時エラーが出なくなります。 block 内で大きな配列を使う時は、allocatable で heap に確保するほかに、save 属性を付けて static に確保する手段があることになります。メインプログラムなどでは、static に取る方が無駄なオーバヘッドを…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffortran66.hatenablog.com%2Fentry%2F2020%2F08%2F27%2F003448&quot; title=&quot;【メモ帳】block 内の配列 stack か static か - fortran66のブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://m.media-amazon.com/images/I/51Pv5pLgsUL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-08-27 00:34:48</published>
  <title>【メモ帳】block 内の配列 stack か static か</title>
  <type>rich</type>
  <url>https://fortran66.hatenablog.com/entry/2020/08/27/003448</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
