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

matlab java.lang.OutOfMemoryError: Java heap space

À´×Ôhttp://www.ilovematlab.cn/thread-30836-1-1.html
matlab java.lang.OutOfMemoryError
JavaÐéÄâ»úÄÚ´æ²»¹»ÓÃÁË.¿ÉÒÔÔö¼Ó×î´óÄÚ´æÉèÖÃ.
1. ²éÕÒmatlab¸ù·¾¶.ÔÚmatlabÃüÁîÐÐÖÐÇÃÈë:matlabroot
ÏÔʾ¸ù·¾¶,Èç:C:\MATLAB7
2.²é¿´µ±Ç°JavaÐéÄâ»ú×î´ó¶ÑÄÚ´æ, ÇÃÈë:java.lang.Runtime.getRuntime.maxMemory
3.²é¿´JavaÐéÄâ»ú°æ±¾.ÇÃÈë:version -java
4.ÔÚ $MATLAB\bin\$ARCH ·¾¶ÏÂн¨java.optsÎļþ.
$MATLABÊǸù·¾¶,ÀýÈçC:\MATLAB7
$ARCHÊÇϵͳ¼Ü¹¹.ÀýÈçwin32,ÔòÔÚC:\MATLAB7\bin\win32ÏÂн¨java.optsÎļþ.
5.ÓüÇʱ¾´ò¿ªjava.optsÎļþ,
¶ÔÓÚ²»Í¬µÄ°æ±¾µÄJavaÐéÄâ»ú,ÊäÈë:
The following table shows the default settings MATLAB uses for versions of the JVM:
JVM      Initial Heap Size    Max Heap Size
1.6.0    -Xms64m              -Xmx128m (32-bit)
                                             -Xmx196m (64-bit)
1.5.0    -Xms64m              -Xmx96m  (32-bit)
                                             -Xmx128m (64-bit)
1.4.2    -Xms16m              -Xmx96m
1.3.1    -Xms16000000         -Xmx64000000
1.2.2    -Xms16000000         -Xmx64000000
1.1.8    -ms16000000          -mx64000000
ÀýÈçÎÒµÄJavaÊÇ1.4.2£¬ÔÚjava.optsÎļþдÈë-Xmx96m£¬±£´æ¾ÍokÀ²
Èç¹ûÊäÈë´íÎó¾Í±¨´í£ºwarning : Failed to start to Java Virtual machine
6. ÖØÆômatlab,ÇÃÈëjava.lang.Runtime.getRuntime.maxMemory
ÏÔʾ×î´óÄÚ´æ¸Ä±ä,ÉèÖóɹ¦.


Ïà¹ØÎĵµ£º

javaÄÚ´æ»ØÊÕ»úÖÆ

ÒýÑÔ
JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø,ÀàµÄʵÀý(¶ÔÏó)´ÓÖзÖÅä¿Õ¼ä¡£JavaÐéÄâ»ú(JVM)µÄ¶ÑÖд¢´æ×ÅÕýÔÚÔËÐеÄÓ¦ÓóÌÐòËù½¨Á¢µÄËùÓжÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸ÁÁ¢£¬µ«ÊÇËüÃDz»ÐèÒª³ÌÐò´úÂëÀ´ÏÔʽµØÊÍ·Å¡£Ò»°ãÀ´Ëµ£¬¶ÑµÄÊÇÓÉÀ¬»ø»ØÊÕ À´¸ºÔðµÄ£¬¾¡¹ÜJVM¹æ·¶²¢²»ÒªÇóÌØÊâµÄÀ¬»ø»ØÊÕ¼¼Êõ£ ......

java equalsÓë== µÄÇø±ð

equals ·½·¨ÊÇ java.lang.Object ÀàµÄ·½·¨¡£
ÓÐÁ½ÖÖÓ÷¨ËµÃ÷£º
£¨1£©¶ÔÓÚ×Ö·û´®±äÁ¿À´Ëµ£¬Ê¹ÓÓ==”ºÍ“equals()”·½·¨±È½Ï×Ö·û´®Ê±£¬Æä±È½Ï·½·¨²»Í¬¡£
“==”±È½ÏÁ½¸ö±äÁ¿±¾ÉíµÄÖµ£¬¼´Á½¸ö¶ÔÏóÔÚÄÚ´æÖеÄÊ×µØÖ·¡£
“equals()”±È½Ï×Ö·û´®ÖÐËù°üº¬µÄÄÚÈÝÊÇ·ñÏàͬ¡£
±ÈÈ磺 ......

JavaÐéÄâ»úÄÚ´æµ÷Õû

JavaÐéÄâ»úĬÈÏ·ÖÅä64MÄڴ棬Èç¹ûÄãµÄÓ¦ÓñȽϴ󣬳¬³ö64MÄڴ棬JavaÐéÄâ»ú¾Í»áÅ׳öOutOfMemoryError£¬²¢Í£Ö¹ÔËÐС£²»¹ÜÊÇʲôӦÓã¨WebÓ¦Óá¢ApplicationµÈ£©£¬Ö»ÐèÒªÐÞ¸ÄÄãµÄ»úÆ÷ÉϵÄÔËÐÐJavaÃüÁÔÚjava xxxÃüÁîÖÐÌí¼Ó-Xms(×îСʹÓÃÄÚ´æ)¡¢-Xmx£¨×î´óʹÓÃÄڴ棩¼´¿É½â¾ö¡£µ±È»£¬Õâ¶ùµÄÄÚ´æÈÝÁ¿¶¼ÊÇÖ¸ÎïÀíÄڴ棬²»Ä ......

java·ºÐÍ ×ªÔØ


Ó¢ÎÄÔ­ÎĵØÖ·:
http://www.onjava.com/pub/a/onjava/2005/07/06/generics.html
ÖÐÎĵØÖ·:
http://www.matrix.org.cn/resource/article/43/43634_java_generics.html
¹Ø¼ü´Ê£º java generics java5
ÕªÒª
       ·ºÐÍÊÇJ2SE 5.0×îÖØÒªµÄÌØÐÔ¡£ËûÃÇÈÃÄãдһ¸ötype(Àà»ò½Ó¿Ú£©ºÍ´´½¨Ò»¸ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ