<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yohhoy</author_name>
  <author_url>https://blog.hatena.ne.jp/yohhoy/</author_url>
  <blog_title>yohhoyの日記</blog_title>
  <blog_url>https://yohhoy.hatenadiary.jp/</blog_url>
  <categories>
    <anon>C</anon>
    <anon>C2x</anon>
    <anon>POSIX</anon>
    <anon>C2y</anon>
  </categories>
  <description>C標準ライブラリrealloc関数に対して、サイズ0を指定すべきでない。realloc(ptr, 0)によってptrが指すメモリブロックが解放（free(ptr)相当）される保証はない。この動作は ISO C および POSIX それぞれで明言されている。JPCERT MEM04-C サイズ0のメモリ割り当てを行わない も参照のこと。C標準ライブラリ仕様に文面解釈の幅があったため処理系ごとに動作が異なる状況となっており、次期C2x(C23)標準ライブラリでは「reallocへのサイズ0指定」は廃止予定の機能(obsolescent feature)とされる。これ以外の挙動については現行C17と…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20210909%2Fp1&quot; title=&quot;realloc(ptr, 0)は廃止予定 - yohhoyの日記&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>2021-09-09 00:00:00</published>
  <title>realloc(ptr, 0)は廃止予定</title>
  <type>rich</type>
  <url>https://yohhoy.hatenadiary.jp/entry/20210909/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
