ã¡ã¢ãªãªã¼ã¯ã«æ©ã¾ããã¦ããæè¡è ã¯å¤ãã ãããã¡ã¢ãªãªã¼ã¯ãå«ã§GCã¨ããæè¡ãéçºãããã¨ãã£ã¦ãéè¨ã§ã¯ãªãããæ´å²çã«ã¯C++ããJavaã¸ã·ãããèµ·ãã大ããªçç±ã®ã²ã¨ã¤ã¨ãã£ã¦ãããUnixç³»ã®ç°¡åãªå®ç¾©ã§ããã°ããã¼ãé åãæããã¤ã³ã¿ï¼ã¢ãã¬ã¹ï¼ããã¹ããã¦ãã¾ãã°ãã®ã¡ã¢ãªã¯ããæ¼ããã¨ãã£ã¦ããããã¨ãã°ãããã£ãã³ã¼ãã ã struct { int i; char c; } spam; int main(){ void* p; int i; for(i=0; i<1024; ++i){ p = malloc(sizeof(struct spam)); } pause(); } ãã®ã³ã¼ãã§ã¯pause(3)ã®æç¹ã§ç´5KBã®ã¡ã¢ãªãæ¼ãã¦ãããfree(3)ã使ãã°ã¡ã¢ãªãOSã«è¿å´ã§ããããã¢ãã¬ã¹ãåãããªãã®ã§è¿å´ã§ããªãã ã¨ããããããã§ããããã®ã¯ãã¡ã¢ãª
{{#tags}}- {{label}}
{{/tags}}