éçºãã¦ãã¨Activityã«Bitmapãæãããããã¨ã£ã¦ãããã ã§ãã¡ã³ãã§æã£ã¦ãã¨èªåã§è§£æ¾ããªãã¦ã¯ãªããªãã Bitmapã®ã¡ã¢ãªç®¡çã¯ãã¤ãã£ãå´ã§ç®¡çããã¦ãã®ã§æ示çã«éæ¾ããå¿ è¦ãããã ãã¸ã§ï¼ã£ã¦æã£ãã®ã§å®é¨ãã¦ã¿ã å®é¨å 容 以ä¸ã®ãã¿ã¼ã³ã§BitmapActivityãã©ã®ããã«å¤åããããç¢ºèª å®é¨1 ImageViewãæããªãActivity å®é¨2 ã¬ã¤ã¢ã¦ãã§ImageViewãæã£ãActivity å®é¨3 ã¬ã¤ã¢ã¦ãã§ImageViewãæã¡ãã¡ã³ãå¤æ°ã§ãImageViewããã¤Activity å®é¨4 ImageViewãæã¡ãã¡ã³ãå¤æ°ã§Bitmapããã¤Activity å®é¨5 Bitmap#recycleã®æ£ãã使ãæ¹ ä½¿ãã¢ã㪠ãããªæãã®ã¢ã㪠å®é¨2ã4 MainActivity>BitmapActivity>ï¼æ»ããã¼ã§ï¼
Androidã¢ããªãéçºãã¦ããã¨ããã¾ã«OutOfMemoryã«ééãããããããæã«ä¾¿å©ãªãã¡ã¢ãªãªã¼ã¯ã®èª¿æ»æ¹æ³ãç´¹ä»ããã 以ä¸ã®ãµã¤ããåèã«ããã¦ããã£ãã Memory Analysis for Android Applications ã¡ã¢ãªãªã¼ã¯ãçºè¦ï¼Androidã¢ããªã®ã¡ã¢ãªè§£æææ³ ä¸è¨ã®ãµã¤ãã¯ãæé ããããã«ããç®æããã£ãã®ã§ãè£è¶³ã®æå³ã§æ¸ããã¨æãã ã¡ã¢ãªãªã¼ã¯ã調æ»ããã«ã¯ï¼ ã¡ã¢ãªãªã¼ã¯ã調æ»ãããã¨è¨ããã¦ãããªããªããã³ã¨ããªãããããããã£ã¦ãããã¨ã¯ç°¡åã ã¢ããªã±ã¼ã·ã§ã³ãæä½ãã ã¬ãã¼ã¸ã³ã¬ã¯ã·ã§ã³(GC)ãèµ°ããã ãã¼ãã¡ã¢ãªã®ç¶æ ãåå¾ ãã¼ãã¡ã¢ãªãè¦ã ã¬ãã¼ã¸ã³ã¬ã¯ã·ã§ã³(GC)ã§ååã§ãã¦ããªãã¡ã¢ãªãæ¢ã ã¨ããï¼ã¤ã®æé ã ããããã§ååã§ãã¦ããªãã¡ã¢ãªãããã°ãååã§ããããã«åç §ãæ¶ãããããå¿ è¦ãããï¼ããã
Androidããããã§ããã ä»æ¥ãOut Of Memoryãåºãã¦ãã¾ãã§ããããã ãããªããªãã«æå ±ã§ãã å°ãã§ãã¡ã¢ãªã«ããããããã°ã©ã ãã ä»æ¥ã¯SoftReferenceã®ã話ã§ãã ãã¬ã¼ããªã Androidã§ï¼ã¨ãããããJavaã§ï¼ããã©ã¼ãã³ã¹ã«æãå½±é¿ãä¸ããã®ã¯ã¤ã³ã¹ã¿ã³ã¹çæã®é¨åã§ã¯ãªãã§ããããã ã«ã¼ãã®ä¸ã§ã¤ã³ã¹ã¿ã³ã¹ãçæããããã®ãªãããã¡ã¾ã¡ããªãã®UIã¯æ©æãã失ããã¨ã«ãªãã§ãããã ã¤ã³ã¹ã¿ã³ã¹çæã¯GCã®æºã§ããã¹ãããã¶ã¯ã¼ã«ããå°ãã§ãé¿ããããã«ã¯æ¥µånewãªã©ã¯æ§ããªããã°ãªãã¾ããã ã¨ãªãã¨ãã¤ã³ã¹ã¿ã³ã¹ãä½ããªããã¨ã究極ãªã®ã§ãããå ¨ãä½ããªãã¨ããããã«ã¯ããã¾ããããªãã°ãä¸åº¦ä½ã£ãã¤ã³ã¹ã¿ã³ã¹ã¯åå©ç¨ãããã§ã¯ããã¾ãããã ãã®æã«å½¹ã«ç«ã¤ã®ããã£ãã·ã¥ã§ããä¸åº¦ä½ã£ãã¤ã³ã¹ã¿ã³ã¹ã¯ãã£ãã·ã¥ã«ä¿æã
â大容éã¡ã¢ãªãæ´»ç¨ããããã« ååããä¼ãããã¡ã¢ãªä¾¡æ ¼ã®ä½è½ã¯ãç¸å¤ãããæ¢ã¾ããªãããã§ã«åºå¤ã«è¿ãã¨è¦ããã¦ãã1GB DIMMã¯ã»ã¼ä¸ãæ¢ã¾ã£ã¦ãããã2GB DIMMã®æå®å¤ã¯3,780åã¨ã1,000å以ä¸ãä¸ãã£ãããããããããããæå®å¤ã®ãã¼ãã©ã³ã/ãã«ã¯åã®ã¡ã¢ãªä¾¡æ ¼ã«å¼ãããããããã«ãä¿è¨¼ãä»ãããã©ã³ãåã®ã¡ã¢ãªãä¸ããç¶ãã¦ãããååçè ã1æ1ä¸åå¼±ã§è³¼å ¥ãã2GB DIMMããä»é±ã¯6,000åå¼·ã§è³¼å ¥ãããã¨ãã§ããã1é±éã§3,000åãã¾ããä¾¡æ ¼ãä½ä¸ãããã¨ã«ãªãã ããããã¡ã¢ãªä¾¡æ ¼ã®ä½ä¸ã¯ãã¡ã¢ãªã¡ã¼ã«ã¼ã®åçãç´æãã¦ãããã¨ã¯ééããªããã¾ããããã ãDDR2ã¡ã¢ãªã®ä¾¡æ ¼ãå®ããªã£ã¦ãã¾ã£ã¦ã¯ãDDR3ã¡ã¢ãªã¸ã®ç§»è¡ã¯ããªãé£ãããªããç¾æç¹ã§DDR2ã¡ã¢ãªæéãDDR2-800ãªã®ã«å¯¾ããDDR3ã¡ã¢ãªã®æéã¯DDR3-1333ã ããã
対象OSï¼Windows 2000ï¼Windows XPï¼Windows Server 2003ï¼Windows Vistaï¼Windows Server 2008 解説 ç¾å¨ã®x86ã¢ã¼ããã¯ãã£ã®CPUã§ã¯ããã¼ãã¦ã§ã¢çã«ã¯36bitã®ç©çã¢ãã¬ã¹ç©ºéï¼64Gbytesï¼ããµãã¼ããã¦ãããå ã ã®x86ã¢ã¼ããã¯ãã£ã§ã¯32bitã®ç©çã¢ãã¬ã¹ç©ºéï¼4Gbytesï¼ãããµãã¼ãããã¦ããªãã£ãããPentium Pro以éã§ã¯ãPAEï¼Physical Address Extensionãç©çã¢ãã¬ã¹æ¡å¼µï¼ãPSEï¼Page Size Extensionããã¼ã¸ã»ãµã¤ãºæ¡å¼µï¼ã¨ãã£ãæè¡ãå°å ¥ãããã¨ã«ããã4Gbytes以ä¸ã®ã¡ã¢ãªããµãã¼ãããã¦ãããã ã32bitçã®ï¼ä¸»ã«ã¯ã©ã¤ã¢ã³ãåãã®ï¼Windows OSã§ã¯ãåºæ¬çã«ã¯4Gbytesã¾ã§ã®ç©çã¡ã¢ãªããæ±ããªãããã«ãª
ãã®è¨äºã¯ãããããæ°ãæã«ããã£ã¦æ稿ãããWindows ã®éçã«æããã¨ããã·ãªã¼ãºã®è¨äºã® 1 åç®ã®æ稿ã§ãããã®ã·ãªã¼ãºã§ã¯ãWindows ãã¢ããªã±ã¼ã·ã§ã³ã§ã®ç¹å®ã®ãªã½ã¼ã¹ã®ä½¿ç¨æ¹æ³ãã©ã¤ã»ã³ã¹ãå®è£ ã«ç±æ¥ãããªã½ã¼ã¹ã®å¶éããªã½ã¼ã¹ã®ä½¿ç¨ç¶æ³ã測å®ããæ¹æ³ãããã³ãªã¼ã¯ã診æããæ¹æ³ã«ã¤ãã¦èª¬æãã¾ããWindows ã·ã¹ãã ãå¹æçã«ç®¡çã§ããããã«ããããã«ãç©çãªã½ã¼ã¹ (CPU ãã¡ã¢ãªãªã©) ããã³è«çãªã½ã¼ã¹ (ä»®æ³ã¡ã¢ãªããã³ãã«ãã¦ã£ã³ã㦠ããã¼ã¸ã£ã¼ ãªãã¸ã§ã¯ããªã©) ã Windows ã§ã©ã®ããã«ç®¡çãã¦ããããç解ãã¦ããå¿ è¦ãããã¾ãããããã®ãªã½ã¼ã¹ã®å¶éã¨ããªã½ã¼ã¹ã®ä½¿ç¨ç¶æ³ã®è¿½è·¡æ¹æ³ãç解ãããã¨ã«ãã£ã¦ããªã½ã¼ã¹ãå©ç¨ããã¢ããªã±ã¼ã·ã§ã³ãã¨ã«ãªã½ã¼ã¹ã®ä½¿ç¨ç¶æ³ãè¦æ¥µããããç¹å®ã®ä½æ¥è² è·ã«å¿ãã¦ã·ã¹ãã ã®ãµã¤ãºãå¹æçã«å¤æ´ããã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}