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
ÏÔʾ×î´óÄÚ´æ¸Ä±ä,ÉèÖóɹ¦.
Ïà¹ØÎĵµ£º
1:¿¼ÂÇʹÓþ²Ì¬¹¤³§·½·¨´úÌæ¹¹¹¹·½·¨À´ÊµÀý»¯Àà¡£
2£ºÊ¹ÓÃ˽Óù¹¹¹º¯Êý£¬Ê¹Àà¾ßÓв»¿ÉʵÀý»¯µÄÄÜÁ¦¡£
3£º±ÜÃâ´´½¨Öظ´µÄ¶ÔÏó
4£ºÏû³ý¹ýÆڵĶÔÏóµÄʹÓÃ
5£º±ÜÃâʹÓÃÖսắÊý
6£ºÊ¹ÀàºÍ³ÉÔ±µÄ¿É·ÃÎÊÐÔ×îС
7£º½Ó¿ÚÓÅÏÈÓÚ³éÏó
8£ºÎªËùÓеIJÎÊý½øÐÐÓÐЧÐÔ¼ì²é
9£º½÷É÷ʹÓÃÖØÔØ
10£ºÊ¹ÓÃ0³¤¶ÈµÄÊý×飬¶ø²»ÊÇ¿Õ
11£º½«¾ ......
ÒýÑÔ
JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø,ÀàµÄʵÀý(¶ÔÏó)´ÓÖзÖÅä¿Õ¼ä¡£JavaÐéÄâ»ú(JVM)µÄ¶ÑÖд¢´æ×ÅÕýÔÚÔËÐеÄÓ¦ÓóÌÐòËù½¨Á¢µÄËùÓжÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸ÁÁ¢£¬µ«ÊÇËüÃDz»ÐèÒª³ÌÐò´úÂëÀ´ÏÔʽµØÊÍ·Å¡£Ò»°ãÀ´Ëµ£¬¶ÑµÄÊÇÓÉÀ¬»ø»ØÊÕ À´¸ºÔðµÄ£¬¾¡¹ÜJVM¹æ·¶²¢²»ÒªÇóÌØÊâµÄÀ¬»ø»ØÊÕ¼¼Êõ£ ......
ORACLEµÄѧϰÒѾ¸æÒ»¶Î茖£¬½ñÌìÒѾ¿ªÊ¼HIBERNATEµÄѧϰ£¬×ÜÌå¸Ð¾õͦÁ¼ºÃµÄ£¬ËäÈ»ºÜ¶àµÄ֪ʶ²»ÄܼÇס£¬µ«ÊÇÔÚʹÓõÄʱºòÄܹ»Ñ¸ËÙµÄÕÒ¶Ô·½·¨À´½â¾öÏàÓ¦µÄÎÊÌ⣬ֻҪÇÚ¼ÓÁ·Ï°£¬¾Í¿ÉÒÔ¼Çס¡£Ö»²»¹ý£¬Ê±¼äÓÐ珢£¬HIBERNATEµÄ¿Î³ÌÒ²Ö»ÓÐÈýÌìµÄʱ¼ä£¬ËùÒÔÔÚÕâÆÚ¼äÎÒµÄÈÎÎñÊǾ¡Á¿ÎüÒý£¬ÔÚ»¨·Å¼ÙµÄʱºòÀ´¸´Ï° ......
Ó¢ÎÄÔÎĵØÖ·:
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(Àà»ò½Ó¿Ú£©ºÍ´´½¨Ò»¸ö ......
×î½üÃæÊÔÁ˺ܶ๫˾£¬Ò»Ð©±ÊÊÔºÍÃæÊÔµÄÎÊÌâÈÃÎÒÉîÓид¥¡£ËäȻ˵×Ô¼º¶ÔJavaÒѾºÜÊìϤÁË£¬²»¹ýµ±Ãæ¶ÔһЩϸ½ÚµÄʱºò£¬×Ô¼ºÈ·ÊµÓеãÎÞ´ÓÏÂÊÖ¡£ÏÂÃæ¼òµ¥µÄÁоټ¸¸öÀý×Ó£º
1.JavaÖжѺÍÕ»µÄÇø±ð
Æäʵ£¬Õâ¸öÎÊÌâ²¢²»ÊǺÜÄÑ¡£²»¹ýÒ²ÐíºÜ¶à³ÌÐòÔ±ÍùÍùºöÂÔÁËÕâÒ»µã£¬ÓÈÆ ......