Skip to main content



      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 #559846] Mon, 20 September 2010 00:23 Go to next message
Eclipse UserFriend
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 #559941 is a reply to message #559846] Mon, 20 September 2010 09:45 Go to previous messageGo to next message
Eclipse UserFriend
Sorry about the duplicate posting. Due to internet connectivity issue same msg got posted multiple time and there appears no way for me to delete the duplicate posts.
Re: Increasing Java maxHeapSize programatically in a xs script [message #560009 is a reply to message #559846] Mon, 20 September 2010 13:15 Go to previous messageGo to next message
Eclipse UserFriend
Badri,
MK_BLDOPTS is defined in a makefile included by package.mak. Have you tried setting it?

Sasha
Re: Increasing Java maxHeapSize programatically in a xs script [message #560012 is a reply to message #560009] Mon, 20 September 2010 13:50 Go to previous messageGo to next message
Eclipse UserFriend
I searched for string MK_BLDOPTS is all files under the package base folder and subfolders but couldnt find it.



Re: Increasing Java maxHeapSize programatically in a xs script [message #560044 is a reply to message #560012] Mon, 20 September 2010 18:04 Go to previous messageGo to next message
Eclipse UserFriend
It's in xdc_rules.mak in <XDCtools>/packages/xdc/bld.
Re: Increasing Java maxHeapSize programatically in a xs script [message #560060 is a reply to message #560044] Mon, 20 September 2010 23:04 Go to previous message
Eclipse UserFriend
Sasha,
Setting the MK_BLDOPTS also doesnt help since this affects only the max memory allocated to package.bld script. However looking at the xdc_rules.mak I was able to figure out how to increase the max memory allocated for my script. I am summarizing below:

My xs script was launched as:
xs ti.omx.omxutils.eventParse <arg1>

To set max memory when executing Main.xs of this package (metaonly module Main inherits xdc.tools.ICmd)
, cmd line invocation should be modified as below:


xs --Xmx512m ti.omx.omxutils.eventParse <arg1>

Thank you for your help
Previous Topic:Increasing Java maxHeapSize programatically in a xs script
Next Topic:DSP Server Wizard
Goto Forum:
  


Current Time: Tue Jul 08 22:32:14 EDT 2025

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

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

Back to the top