Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JAVAÐéÄâ»úÄÚ´æÉèÖÃ

»ù±¾¸ÅÄ
PermGen space£ºÈ«³ÆÊÇPermanent Generation space¡£¾ÍÊÇ˵ÊÇÓÀ¾Ã±£´æµÄÇøÓò,ÓÃÓÚ´æ·ÅClassºÍMetaÐÅÏ¢,ClassÔÚ±»LoadµÄʱºò±»·ÅÈë¸ÃÇøÓò
Heap space£º´æ·ÅInstance¡£ GC(Garbage Collection)Ó¦¸Ã²»»á¶ÔPermGen space½øÐÐÇåÀí
ËùÒÔÈç¹ûÄãµÄAPP»áLOADºÜ¶àCLASSµÄ»°,¾ÍºÜ¿ÉÄܳöÏÖPermGen space´íÎó
Java Heap·ÖΪ3¸öÇø£¬Young£¬OldºÍPermanent¡£Young±£´æ¸ÕʵÀý»¯µÄ¶ÔÏó¡£µ±¸ÃÇø±»ÌîÂúʱ£¬GC»á½«¶ÔÏóÒƵ½OldÇø¡£PermanentÇøÔò¸ºÔð±£´æ·´Éä¶ÔÏó ¡£
JVMÓÐ2¸öGCÏ̡߳£µÚÒ»¸öÏ̸߳ºÔð»ØÊÕHeapµÄYoungÇø¡£µÚ¶þ¸öÏß³ÌÔÚHeap²»×ãʱ£¬±éÀúHeap£¬½«Young ÇøÉý¼¶ÎªOlderÇø¡£OlderÇøµÄ´óСµÈÓÚ-Xmx¼õÈ¥-Xmn£¬²»Äܽ«-XmsµÄÖµÉèµÄ¹ý´ó£¬ÒòΪµÚ¶þ¸öÏ̱߳»ÆÈÔËÐлήµÍJVMµÄÐÔÄÜ¡£
ΪʲôһЩ³ÌÐòƵ·±·¢ÉúGC£¿ÓÐÈçÏÂÔ­Òò£º
l         ³ÌÐòÄÚµ÷ÓÃÁËSystem.gc()»òRuntime.gc()¡£
l         һЩÖмä¼þÈí¼þµ÷ÓÃ×Ô¼ºµÄGC ·½·¨£¬´ËʱÐèÒªÉèÖòÎÊý½ûÖ¹ÕâЩGC¡£
l         JavaµÄHeap̫С£¬Ò»°ãĬÈϵÄHeapÖµ¶¼ºÜС¡£
l         Ƶ·±ÊµÀý»¯¶ÔÏó£¬Release¶ÔÏó¡£´Ëʱ¾¡Á¿±£´æ²¢ÖØÓöÔÏó£¬ÀýÈçʹÓÃStringBuffer()ºÍString()¡£
Èç¹ûÄã·¢ÏÖÿ´ÎGCºó£¬HeapµÄÊ£Óà¿Õ¼ä»áÊÇ×Ü¿Õ¼äµÄ50%£¬Õâ±íʾÄãµÄHeap´¦ÓÚ½¡¿µ×´Ì¬¡£Ðí¶àServer¶ËµÄJava³ÌÐòÿ´ÎGCºó×îºÃÄÜÓÐ65%µÄÊ£Óà¿Õ¼ä¡£
¾­Ñé̸֮£º
1 £® Server ¶Ë JVM ×îºÃ½« -Xms ºÍ -Xmx ÉèΪÏàֵͬ¡£ÎªÁËÓÅ»¯ GC £¬×îºÃÈà -Xmn ÖµÔ¼µÈÓÚ -Xmx µÄ 1/3[2] ¡£
2 £®Ò»¸ö GUI ³ÌÐò×îºÃÊÇÿ 10 µ½ 20 Ãë¼äÔËÐÐÒ»´Î GC £¬Ã¿´ÎÔÚ°ëÃëÖ®ÄÚÍê³É [2] ¡£
×¢Ò⣺
1£®Ôö¼ÓHeapµÄ´óСËäÈ»»á½µµÍGCµÄƵÂÊ£¬µ«Ò²Ôö¼ÓÁËÿ´ÎGCµÄʱ¼ä¡£²¢ÇÒGCÔËÐÐʱ£¬ËùÓеÄÓû§Ï߳̽«ÔÝÍ££¬Ò²¾ÍÊÇGCÆڼ䣬JavaÓ¦ÓóÌÐò²»×öÈκι¤×÷¡£
2£®Heap´óС²¢²»¾ö¶¨½ø³ÌµÄÄÚ´æʹÓÃÁ¿¡£½ø³ÌµÄÄÚ´æʹÓÃÁ¿Òª´óÓÚ-Xmx¶¨ÒåµÄÖµ£¬ÒòΪJavaΪÆäËûÈÎÎñ·ÖÅäÄڴ棬ÀýÈçÿ¸öÏ̵߳ÄStackµÈ¡£
StackµÄÉ趨
ÿ¸öÏ̶߳¼ÓÐËû×Ô¼ºµÄStack¡£ -Xss  ÿ¸öÏß³ÌµÄ Stack ´óС 
StackµÄ´óСÏÞÖÆ×ÅÏ̵߳ÄÊýÁ¿¡£Èç¹ûStack¹ý´ó¾ÍºÃµ¼ÖÂÄÚ´æÒç©¡£-Xss²ÎÊý¾ö¶¨Stack´óС£¬ÀýÈç-Xss1024K¡£Èç¹ûStack̫С£¬Ò²»áµ¼ÖÂStackÒç©¡£
Ó²¼þ»·¾³
Ó²¼þ»·¾³Ò²Ó°ÏìGCµÄЧÂÊ£¬ÀýÈç»úÆ÷µÄÖÖÀ࣬ÄÚ´


Ïà¹ØÎĵµ£º

JAVA½Ó¿ÚµÄ¸ÅÄî¼°ÖÖÀà

       Ò»¸öJava½Ó¿Ú(Interface)ÊÇһЩ·½·¨ÌØÕ÷µÄ¼¯ºÏ£¬ÕâЩ·½·¨ÌØÕ÷µ±È»À´×ÔÓÚ¾ßÌåµÄ·½·¨£¬µ«ÊÇËüÃÇÒ»°ã¶¼À´×ÔÓÚϵͳÖв»¶Ï³öÏֵķ½·¨¡£Ò»¸ö½Ó¿ÚÖ»Óз½·¨µÄÌØÕ÷£¬¶øûÓз½·¨µÄʵÏÖ£¬Òò´ËÕâЩ·½·¨ÔÚ²»Í¬µÄµØ·½±»ÊµÏÖʱ£¬¿ÉÒÔÓÐÍêÈ«²»Í¬µÄÐÐΪ¡£ÔÚJavaÓïÑԵģ¬Java½Ó¿Ú»¹¿ÉÒÔ¶¨ÒåPublic³£Á¿¡£ ......

ʹÓÃJAVAºÍC#¿ª·¢Ribbon½çÃæ

Ribbon Ô­À´³öÏÖÔÚ Microsoft Office 2007 µÄ Word¡¢Excel ºÍ Powerpoint 組¼þÖУ¬ºóÀ´Ò²±»ÔËÓõ½ Windows 7 µÄһЩ¸½¼Ó×é¼þµÈÆäËüÈí¼þÖУ¬È续ͼºÍд×Ö°å¡£ËüÊÇÒ»¸öÊÕ²ØÁËÃüÁî°´Å¥ºÍͼ±êµÄÃæ°å¡£Ëü°ÑÃüÁî×éÖ¯³ÉÒ»×é"±êÇ©"£¬Ã¿Ò»×é°üº¬ÁËÏà¹ØµÄÃüÁÿһ¸öÓ¦ÓóÌÐò¶¼ÓÐÒ»¸ö²»Í¬µÄ±êÇ©×飬չʾÁ˳ÌÐòËùÌṩ ......

java ÐéÄâ»úÔËÐÐʱÊý¾ÝÇøÓò Runtime Data Areas

The Java virtual machine defines various runtime data areas that are used during execution of a program. Some of these data areas are created on Java virtual machine start-up and are destroyed only when the Java virtual machine exits. Other data areas are per thread. Per-thread data areas are create ......

[תÌû]Javaѧϰ֮·£º²»×ßÍä·£¬¾ÍÊǽݾ¶

[תÌû]Javaѧϰ֮·£º²»×ßÍä·£¬¾ÍÊǽݾ¶
2007-04-11 16:10
ÔÚChinaITLABµ¼Ê¦ÖƸ¨µ¼ÖУ¬±ÊÕß·¢ÏÖÎʵÃ×î¶àµÄÎÊÌâĪ¹ýÓÚ"ÈçºÎѧϰ±à³Ì£¿Java¸ÃÈçºÎѧϰ£¿"¡£ÀàËƵÄÎÊÌâ»Ø´ð¶àÁË£¬ÄÑÃâ»á¸Ð¾õÑá·³£¬¾ÍÃÈÉúÁËдϱ¾ÎĵÄÏë·¨¡£µ½Ê±ºòÔÙÓÐÈËÎÊÆðÀàËƵÄÎÊÌ⣬ÎÒ¿ÉÒÔ¸æËßËû£¨Ëý£©£¬ÇëÄãÈ¥¿´¿´¡¶Javaѧϰ֮·¡·¡£°Ý¶Á¹ý̨Íå²ÌѧïÞÏÈ ......

JavaµÄÊ®´óʼþ


1990£­1994£ºJavaÔµÆð
Larry Wall˵£¬ÓÅÐã³ÌÐòÔ±Ó¦ÓеÄÈý¸öÌصã:ÀÁ¶è¡¢¼±ÔêºÍ°ÁÂý¡£Java¾ÍÊǵ®ÉúÔÚһȺÀÁ¶è¡¢¼±Ôê¶ø°ÁÂýµÄ³ÌÐòÌì²ÅÖ®ÖС£
1990Äê12Ô£¬SunµÄ¹¤³ÌʦPatrick Naughton±»µ±Ê±Ôã¸âµÄSun C++¹¤¾ßÕÛÄ¥µÄ¿ì·èÁË¡£Ëû´óÉù±§Ô¹£¬²¢ÍþвҪÀ뿪SunתͶµ±Ê±ÔÚSteve JobsÁ쵼֮ϵÄNeXT¹«Ë¾¡£Áìµ¼²ãΪÁËÁôסËû£¬¸øËû ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ