<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>methane</author_name>
  <author_url>https://blog.hatena.ne.jp/methane/</author_url>
  <blog_title>methaneのブログ</blog_title>
  <blog_url>https://methane.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>stream（ファイル、socket、他にももろもろな、stream型のi/o）からinputするときの受信バッファとして、「最大でN[byte]必要ってことはわかってるんだけど、実際にはNよりずっと少ないことが多い」という場面は良くある。 で、仮想メモリ空間の広さに比べてNが十分に小さいとき（32bitなら数百MB程度）、全部mallocで確保してしまって、先頭から順に使うという富豪的プログラミングが可能だ。しかし、初期化されないバッファの確保ができない言語の場合は、大容量バッファの確保には多大なコストがかかってしまう。たとえば、バッファが0で初期化される場合、どうせファイル読み込むのに無駄…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmethane.hatenablog.jp%2Fentry%2F20070608%2F1181270147&quot; title=&quot;初期化されないメモリ空間確保が必要 - methaneのブログ&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2007-06-08 11:35:47</published>
  <title>初期化されないメモリ空間確保が必要</title>
  <type>rich</type>
  <url>https://methane.hatenablog.jp/entry/20070608/1181270147</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
