注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

神魔破杜梓的叨叨堂

Programming every day!

 
 
 

日志

 
 
 
 

编译Flex程序的时候碰到“out of memory”怎么办?  

2008-08-07 17:24:01|  分类: My Tech |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
原文来自ntt.cc
Problem Summary: When I compile a project including thousands MXML and AS files with Flex Ant, I got an error message as below displayed in the Console panel of Flex Builder:
  1. java.lang.OutOfMemoryError: Java heap space
  2. at java.util.HashMap.resize(Unknown Source)
  3. at java.util.HashMap.addEntry(Unknown Source)

It seems that the memory usage of my JRE reaches its limitation — as we know, Flex Builder is running in JRE. Here is a simple way to solve this problem. It‘s just changing the preferences settings of Flex Builder.

Solution Summary: There are two useful arguments of JRE to control the memory usage:

  1. -Xms define the minimum usage of memory by JRE
  2. -Xmx define the maximum usage of memory by JRE

I just set –Xmx to 1024m to satisfy the usage of compiling such huge Flex project.

With Flex Builder, point to the menu “Windows” at the top and open the “Preferences” dialog.
Preferences

Preferences-01

Expand the left tree as this: Java->Installed JREs. Then select the JRE being used and click Edit to open the “Edit JRE” dialog.

Preferences-02

Then, set the Default VM arguments as “-Xmx1024m” to enlarge the memory usage limitation.


  评论这张
 
阅读(644)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017