Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Applet heap size  (Read 2911 times)
0 Members and 1 Guest are viewing this topic.
Offline hishadow

Senior Newbie





« Posted 2008-11-25 16:46:13 »

I'm doing a port of some Flash code to an applet, but stumbled upon a little problem: the heap size of an applet. Some surfing suggested that the heap size for applets are a static size and it can be changed with each user speficying the size in their control panel. Is this right (in which case the responsible ought to be shot! Smiley )

Are there any work-around for this (like a signed applet etc.)? My entire interface relies on the webbrowser.
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #1 - Posted 2008-11-25 16:50:02 »

The default heap size is 64mb... if that's not enough for an applet you might be doing something wrong! Do you need more than that?

Cas Smiley

Offline hishadow

Senior Newbie





« Reply #2 - Posted 2008-11-25 16:56:02 »

I need ALOT more. I'm doing image processing and my current implemention in Flash can use up to a gigabyte or more of memory. Who the hell thought 64mb of memory should be enough (640K is Enough For Anyone)!!! Smiley I'd actually like to stay in Flash, but the JavaVM allows for so much more so it's a bit fustrating walking into the Applet world.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Hansdampf

Senior Member


Projects: 3


too offending?


« Reply #3 - Posted 2008-11-25 17:57:01 »

in 1.6 update10 you can define the heap via tags, no need for signing:
1  
<PARAM name="java_arguments" value="-Xmx500m">

But this won't work with versions below.

Quote
Who the hell thought 64mb of memory should be enough (640K is Enough For Anyone)
yes! and I guess about 90% of all users won't care about /recognize it if the applet needed 64 or 640mb.

lots of sillystupid games: http://www.emaggame.com
Offline hishadow

Senior Newbie





« Reply #4 - Posted 2008-11-25 18:10:06 »

in 1.6 update10 you can define the heap via tags, no need for signing:
1  
<PARAM name="java_arguments" value="-Xmx500m">

But this won't work with versions below.
yes! and I guess about 90% of all users won't care about /recognize it if the applet needed 64 or 640mb.

I just discovered this too and been able to push memory up to atleast 800mb. Needless to say, ranting mode off. Smiley

Wonder if JavaFX pushed this into the update (or maybe I should say, Adobe pushing into the Application domain)?
Offline DzzD
« Reply #5 - Posted 2008-11-25 18:41:12 »

to make the story short except in 1.6 update 10 there is no way to increase the JVM memory setting at runtime, and even a signed applet wont works. I found that the default heap size may vary depending on target JVM and maybe OS not sure.

one workaround could be to use streaming and allocate object only when they are requiered rather than allocating all objects when starting.


Offline hishadow

Senior Newbie





« Reply #6 - Posted 2008-11-25 18:59:04 »

to make the story short except in 1.6 update 10 there is no way to increase the JVM memory setting at runtime, and even a signed applet wont works. I found that the default heap size may vary depending on target JVM and maybe OS not sure.

one workaround could be to use streaming and allocate object only when they are requiered rather than allocating all objects when starting.
I atleast have no problem with requiring 1.6 update 10 and fallback on Flash with limited functionality.
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2008-11-25 21:29:33 »

to make the story short except in 1.6 update 10 there is no way to increase the JVM memory setting at runtime, and even a signed applet wont works. I found that the default heap size may vary depending on target JVM and maybe OS not sure.

one workaround could be to use streaming and allocate object only when they are requiered rather than allocating all objects when starting.


In theory, you can launch a separate java VM in your signed applet, and make both VMs map the same file (MappedByteBuffer). Now you can transfer data between the two VMs at full speed (capped by memory bandwidth).

Works in 1.4.2+ as opposed to 1.6.0_u10+

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline DzzD
« Reply #8 - Posted 2008-11-25 21:37:13 »

Quote
In theory, you can launch a separate java VM in your signed applet, and make both VMs map the same file (MappedByteBuffer). Now you can transfer data between the two VMs at full speed (capped by memory bandwidth).

Works in 1.4.2+ as opposed to 1.6.0_u10+

you mean lauching a new java instance ? like executing :

java -Xmx512m mydownloadedjar

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #9 - Posted 2008-11-25 21:52:33 »

Yes, you can have interprocess memory I/O with mapped bytebuffers.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (16 views)
2014-09-19 03:14:18

Dwinin (34 views)
2014-09-12 09:08:26

Norakomi (61 views)
2014-09-10 13:57:51

TehJavaDev (84 views)
2014-09-10 06:39:09

Tekkerue (42 views)
2014-09-09 02:24:56

mitcheeb (64 views)
2014-09-08 06:06:29

BurntPizza (47 views)
2014-09-07 01:13:42

Longarmx (35 views)
2014-09-07 01:12:14

Longarmx (39 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!