ã¡ã¢.ãªãªã¼ã¯ã®èª¿æ»ãããã¨ãã®ã¡ã¢ã ã¡ã¢ãªãªã¼ã¯æ¤åº:mtraceç·¨ ããè¦ç´ gccã®å ´åãmtraceã¨ãããã¼ã«ã使ããã 使ç¨æé 㯠ï¼ï¼ç°å¢å¤æ°ï¼MALLOC_TRACE=[ãã°ãã¡ã¤ã«å]ãè¨å® ï¼ï¼ããã°ã©ã æ¹é ï¼é¢æ° mtrace()ã muntrace() ãæ¿å ¥ã(ãã®éã®malloc, freeãã«ã¦ã³ãããã) ï¼ï¼ã³ã³ãã¤ã«ï¼ -g ãªãã·ã§ã³ãã¤ãããï¼gcc -g hoge.cï¼ ï¼ï¼ãã°è§£æï¼mtrace [ããã°ã©ã å] [ãã°ãã¡ã¤ã«å] ç°¡æmallocãããã°ã¡ã¢ã«ã¯ãmallocããã¿ã®ç°å¢å¤æ°ã®è§£èª¬çãè¼ã£ã¦ãã ãLinuxã®ãããã°ææ³ããã¹ã¿ã¼ãããã§ã¯å種ãã¼ã«ã®æå¹ãªå©ç¨æ¹æ³ãã¾ã¨ãããã¦ããã æ¬ç¨¿ã§ã¯ãLinuxããã°ã©ã ããããã°ããããã®4éãã®ã·ããªãªãç´¹ä»ãã¾ããã·ããªãª1ã§ã¯ãã¡ã¢ãªã¼å²ãå½ã¦ã®åé¡ãæ±ããµã³ãã«ã»ãã
{{#tags}}- {{label}}
{{/tags}}