<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>na6ko</author_name>
  <author_url>https://blog.hatena.ne.jp/na6ko/</author_url>
  <blog_title>narukoの開発メモ</blog_title>
  <blog_url>https://na6ko.hatenadiary.jp/</blog_url>
  <categories>
  </categories>
  <description>前置き(長い) 現在開発中の機材の不具合を分析していたところ MCU ではなく PC 側のソフトがよくないと判断をした. 問題の機能を修正したところ、プログラム終了時に segmentation error が出るようになった. その理由は memory leak であり、malloc はしたのに free を忘れているとか、free を多重にやってしまうことだ. つまり潜在的なバグが表に出てきてしまった. 文字列領域の確保と可変長配列 (C99 VLA) 自分のソースを分析したところ malloc で多いものは下記だった. 可変長となる文字列領域の確保 クラスもどきの初期化と終了 文字列に関…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fna6ko.hatenadiary.jp%2Fentry%2F2023%2F12%2F07%2F210110&quot; title=&quot;C での文字列領域の確保 - narukoの開発メモ&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>2023-12-07 21:01:10</published>
  <title>C での文字列領域の確保</title>
  <type>rich</type>
  <url>https://na6ko.hatenadiary.jp/entry/2023/12/07/210110</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
