Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » Increasing Java maxHeapSize programatically in a xs script(increasing java max heap size)
Increasing Java maxHeapSize programatically in a xs script [message #559844] Mon, 20 September 2010 04:19 Go to next message
Badri is currently offline BadriFriend
Messages: 17
Registered: July 2009
Junior Member
Champs,
I have a xs script that inherits the Icmd interface. It is a memory intensive script and requires more than 64M of heap space and I get the OutOfMemory error.
I would like to know if there is a programmatic way of increasing the Java Max heap size (equivalent on -Xmx option) in my script. I want to avoid having to change Java Control panel settings to change max heap size on every new machine I run the script.
I have gone thru the archives where MK_BLDOPTS is mentioned as way to increase the max heap size. However, this env variable is not defined in the package.mak generated for my package. Does xdc provide any interface to control java maxHeapSize at script launch time?
I have reproduced my screen output below:

D:\git_rep\ti\omx\omxutils\eventParse>xs ti.omx.omxutils.eventParse D:\Temp\profile_25thJun_1080i\vid_event.bin
Java Base:D:\tools_wtbu_base_omx\xdctools_3_20_01_51
Max memory = 63.5625
cmdr = xdc.tools.Cmdr.Instance#0 {
context = 0 {
}

tid = 0
socket = null
}

args = []#0 {
0 = D:\Temp\profile_25thJun_1080i\vid_event.bin
}


Regards
Badri
Re: Increasing Java maxHeapSize programatically in a xs script [message #629923 is a reply to message #559844] Wed, 29 September 2010 23:59 Go to previous message
Dave Russo is currently offline Dave RussoFriend
Messages: 172
Registered: July 2009
Senior Member
Although undocumented, the xs command accepts an option (--X) that passes options to the underlying JVM. So, you should be able to get what you need via something like:

xs -Xmx500M ...

This will allow up to 500M Java heap.

SUN's 1.5 JVM (which we are using) documents the following options :
-Xmixed mixed mode execution (default)
-Xint interpreted mode execution only
-Xbootclasspath:<directories and zip/jar files separated by :>
set search path for bootstrap classes and resources
-Xbootclasspath/a:<directories and zip/jar files separated by :>
append to end of bootstrap class path
-Xbootclasspath/p:<directories and zip/jar files separated by :>
prepend in front of bootstrap class path
-Xnoclassgc disable class garbage collection
-Xincgc enable incremental garbage collection
-Xloggc:<file> log GC status to a file with time stamps
-Xbatch disable background compilation
-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size
-Xss<size> set java thread stack size
-Xprof output cpu profiling data
-Xfuture enable strictest checks, anticipating future default
-Xrs reduce use of OS signals by Java/VM (see documentation)
-Xcheck:jni perform additional checks for JNI functions
-Xshare:off do not attempt to use shared class data
-Xshare:auto use shared class data if possible (default)
-Xshare:on require using shared class data, otherwise fail.

The -X options are non-standard and subject to change without notice.
Previous Topic:[Announce] new eTrice project proposal: an implementation of the ROOM modeling language
Next Topic:RTSC-pedia seems to not work?
Goto Forum:
  


Current Time: Thu Apr 25 09:30:09 GMT 2024

Powered by FUDForum. Page generated in 0.03166 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top