ãªãã ã£ã¦ã¼ï¼ï¼ï¼ï¼(ï¼ï¾Ð´ï¾ï¼ (ï¾Ð´ï¾ï¼ï¼ï¾Ð´ï¾ï¼ï¼
ãããéè¨ããããã¾ããããC++ã®åå¨ãdlmallocãæ¸ãåã£æãã«ãªã£ãã®ã¯ç¢ºãã§ãã
dlmallocã¯ç¾å¨ã¯Linuxãªã©ã®ããã©ã«ãã®mallocå®è£
ã§ã¯ããã¾ãããã
dlmallocã¯æ¬å½ã«åªããã¢ã«ã´ãªãºã ãæã£ã¦ãã¾ãã
ã¾ãã¯ãã¯ããã«ãã®æ¥æ¬èªè¨³ãå¼ç¨ã¨ãã¦è¼ãã¦ããã¾ããï¼ãã®è¨äºèªä½ã¯é常ã«å¤ããã®ã§ç¾å¨ã®mallocã®å®è£
ã®è©³ç´°ãåæ ãã¦ã¯ãã¾ããããä»ãªã使ãã«å¤ããã¢ãã±ã¼ã¿ã ã¨ä¿ºã¯ä¿¡ãã¾ããã使ã£ã¦ãã¾ãï¼
http://g.oswego.edu/dl/html/malloc.html
ã¯ããã«
ã¡ã¢ãªã¢ãã±ã¼ã¿ã¯ã½ããã¦ã§ã¢å·¥å¦ã®ã¤ã³ãã©ã«ãããèå³æ·±ãã±ã¼ã¹ã¹ã¿ãã£ãå½¢æãã¾ãã
ç§ã¯ããã1987å¹´ã«æ¸ãå§ãã¦ä»¥æ¥ãç¶æã¨çºå±ã«åªãã¦ãã¾ãããï¼ããã¯å¤ãã®ãã©ã³ãã£ã¢ã®æ¹ã ã®å©ãããã£ã¦ããã§ã)
ãã®ã¢ãã±ã¼ã¿ã¯ããã¤ãã®å©ãã¨ãªãã¦ã¼ãã£ãªãã£é¢æ°ã¨å ±ã«æ¨æºCã®é¢æ°ã§ããmalloc(), free(), realloc()ã®å®è£ ãæä¾ãã¾ãã
ãã®ã¢ãã±ã¼ã¿ã«ååãä¸ãããã¨ã¯ä¸åº¦ãããã¾ããã
ãã ãå¤ãã®äººãããããDoug Lea's Mallocããããã¯ç¥åã§ãdlmallocãã¨å¼ã³ã¾ãã
ãã®ã¢ãã±ã¼ã¿ã®ã³ã¼ãã¯ãããªãã¯ãã¡ã¤ã³ã«ä½ç½®ãã¦ãã¾ãã
ï¼ããã¯
ftp://g.oswego.edu/pub/misc/malloc.cããå©ç¨å¯è½ã§ãï¼
ããã¦ãã¨ã¦ãåºã使ããã¦ãã¾ãã
mallocã®ããã©ã«ããã¼ã¸ã§ã³ã¨ãã¦å¹¾ã¤ãã®Linuxã®ãã¼ã¸ã§ã³ã§ç¨ãããããã
å¹¾ã¤ãã®ä¸è¬çã«ä½¿ããã¦ããã½ããã¦ã§ã¢ããã±ã¼ã¸ã®ä¸ã§ï¼ãã¤ãã£ãã®mallocã¨ç½®ãæãããã¦ï¼ä½¿ããã¦ãã¾ãã
ä»ã«ãæ§ã ãªPCã®ç°å¢ãçµã¿è¾¼ã¿ã·ã¹ãã ãç§ã®ç¥ããªãã¨ã¦ãå¤ãã®å ´æã§ä½¿ç¨ããã¾ããã
ç§ã¯ãã®ã¢ãã±ã¼ã¿ã®æåã®ãã¼ã¸ã§ã³ãä½ããã®C++ããã°ã©ã ãæ¸ããå¾ã«æ¸ãã¾ããã
ããã¯ã¡ã¢ãªã®åçå²ãå½ã¦ããã¾ãåãäºãæå¾ ãããããã°ã©ã ã§ããã
ç§ã¯è¦ã¤ãã¦ãã¾ã£ãã®ã§ãããã®ç°å¢ã§ã®ã¢ãã±ã¼ã¿ãç§ã®äºæ³ããéãã«ãã£ããã¨åãããã¤ï¼ãããã¯ï¼ãéãã«å¤ãã®ã¡ã¢ãªé åãæ¶è²»ãã¦ãããã¨ãã
ããã¯ç§ããã®ããã°ã©ã ãåããã¦ããã·ã¹ãã (主ã«SunOsã¨BSDã®ææ°ç)ä¸ã®ã¡ã¢ãªã¢ãã±ã¼ã¿ã®ç¹æ§æ ã§ããã
ç§ã¯ãã®æåãæã¡å´©ãããã«ã¾ãå¤ãã®C++ã®ä¸ã§åä½ããå°ç¨ã®ã¢ãã±ã¼ã¿ãæ¸ãã¾ããã
æ§ã ãªã¯ã©ã¹ã§operator newããªã¼ãã¼ãã¼ãããããã§ãã
ãããã®å¹¾ã¤ãã¯C++Report(1989)ã®è¨äºã®ä¸ã§ãã³ã³ããã¯ã©ã¹ã®çºã®é åå²ãå½ã¦ãã¯ããã¯ã¨ãã¦ç´¹ä»ããã¦ãããã®ã§ãã
ããããç§ã¯ããã«å½ææ¸ãã¦ããæ±ç¨çãªããã°ã©ã ã«å¯¾ãã¦æ°ããã¯ã©ã¹ã追å ããéã«æ°ä»ããã®ã§ãã
åçã«å²ãå½ã¦ããããã使ããããããªæ§ã ãªã¯ã©ã¹ã«ã¨ã£ã¦ã
ããããã«ç¹å¥ãªã¢ãã±ã¼ã¿ãè¨è¿°ãããã¨ãåªããæ¦ç¥ã§ã¯ãªãã¨ã
ï¼1986å¹´ãã1991å¹´ã«ããã¦ç§ã¯GNU C++ library.ã®libg++ã«ããã第ä¸ç·ã«ç«ã¤ä½è ã§ããï¼
ããåºã解決çãæ±ãããã¦ããã®ã§ã
é常ã«ç¹å¥ãªå ´åãé¤ãã¦ãããã°ã©ããå°ç¨ã®ã¢ãã±ã¼ã¿ãè¨è¿°ããèªæã«ã¨ããããªãããã«
é常ã®C++/Cã®è² è·ã®ä¸ã§ããåãã¢ãã±ã¼ã¿ãæ¸ãå¿ è¦ãããã¾ããã
ãã®è¨äºã§ã¯ã¢ãã±ã¼ã¿ã®çºã«å¿ è¦ã«ãªã主ãªè¨è¨ç®æ¨ã¨ãã¢ã«ã´ãªãºã ãããã³å¹¾ã¤ãã®å®ç¾ã«å¯¾ããåé¡ãè¨è¼ãã¾ãã
ã³ã¼ãã®æ¹ã«ç®ãéãã¦é ããã°ãã詳細ãªããã¥ã¡ã³ããè¦ã¤ãããã¨ãã§ããã§ãããã
ã³ã³ãããã¯ã©ã¹ãã¨ã«å°ç¨ã®ã¢ãã±ã¼ã¿ãæ¸ãã¦ãã¾ãèªæã¨ããã®ã¯ç¢ºãã«åå¨ããã¨æãã¾ãã
ã§ããã
é常ã«ç¹å¥ãªå ´åãé¤ãã¦ãããã°ã©ããå°ç¨ã®ã¢ãã±ã¼ã¿ãè¨è¿°ããèªæã«ã¨ããããªãããã«
æ¸ãããã®ãdlmallocãªã®ã§ãã
ããã¯æ³åã«éãã¾ããããå°ããªã¯ã©ã¹ãªã©ãé »ç¹ã«ä½ããã¨ããC++ã ãããããæ¢åã®ã¢ãã±ã¼ã¿ã§ã¯é§ç®ã ã¨ããçµè«ã«ãªã£ãã®ã§ã¯ãªããã¨èªåã¯èãã¾ãã
é常C++ã¯Cãããç´°ãããããã¦é »ç¹ã«new/deleteãããã§ãããããã
ãã®æ¦ç¥ã«å¯¾ããçãã®ä¸ã¤ããååã¯ã©ã¹ãã³ã³ããå¥ã«ã¢ãã±ã¼ã¿ãæ¸ããã¨ãããã¨ã§ã¯ããã¾ããã
è³¢ãåãã¢ãã±ã¼ã¿ãããã°ããã°ã©ãã¯å°ç¨ã®ã¢ãã±ã¼ã¿ãç¨æããå¿
è¦ã¯ãªããªãã®ã§ãã
ããã¦ãããã1989å¹´å½æã«è¡ãããã¨ãããã¨ã¯é©ãã¹ããã¨ã§ã¯ãªãã§ããããï¼
2009å¹´ã«ãªã£ã¦ãå¤ãã®ããã°ã©ãã¯ãã®dlmallocããå£ã£ãããã°ã©ã ã便å©ã ã¨æã£ã¦ä½¿ã£ã¦ããã®ã§ãããã
ï¼æ訳çãªãã®ãå«ãã翻訳ãªã®ã§ãééããªã©ããã°ãæ°å
¼ããªããå¯ããã ããï¼