JDK-4204672 : automatically/programatically setting the default heap size
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.1.2
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6,windows_nt
  • CPU: x86,sparc
  • Submitted: 1999-01-21
  • Updated: 1999-05-26
  • Resolved: 1999-05-26
Related Reports
Duplicate :  
Description
17Feb99 - maureen
> Jerome,
> As a clarification to this bug report which I originally submitted,
> it turns out that I/they confused the stack size and heap size.  SAS greatly
> needs to be able to programmatically/automatically increase the
> heap size and *not* the stack size.
> 
> email excerpt from Buck Hodges of SAS-
> >Our applet requires a larger maximum heap size than the default because we
> >have lots of objects allocated in the heap.  Yes, we have tried to get rid
> >of some unnecessary object allocation, and we have been successful in
> >reducing the required heap memory.  However, our applet and applets others
> >are developing will continue to need a way to set a larger maximum heap.  I
> >would assert that needing a larger maximum heap size is a far more common
> >problem than having a highly recursive applet that needs more stack space.
> 
> Should I change this bug report/RFE or submit a new one?
> How would this affect a potential fix in terms of difficulty and
> schedule?
> Thanks and sorry for the confusion.
> 
> --maureen


end of 17Feb addition
We are trying to convince folks internally to use a Java-based CRM(
Customer Relations Management) system that we have developed with our
products.
 The stuff works great, but we have a very serious deployment problem that
might prevent us from succeeding.
The basic problem is as follows:

     - the default stack size set by the plugin is 25m         
       - unfortunately the kinds of applets they are asking for requires more               stack(around 50m)
        - there is no programmatic way to change this (i.e as parmeter 
           at run time).
      - This means we our users(who are not computer programmers)
           to use the plugin console and change the value to
            something reasonably big. 
      - There is resistence to deploying the applet with this
           additional burden on the user.
 

 We have already figured out how to allow a site to install the plugin on
     an internal website and download it when needed.
The problem is one of overriding the default options stored in the
      registry when running a particular applet.  

jdcinclude

Comments
SUGGESTED FIX
11-06-2004

PUBLIC COMMENTS
10-06-2004

EVALUATION The problem isn't that some obvious API is missing, but that a clear solution has yet to be worked out. Unlike java.exe which runs only one Java application, the plug-in is shared by all applets which use the plug-in tag. The VM only checks the stack size during initialization, and there isn't any API for modifying it while it's running. What therefore happens if the applet needing the bigger stack size isn't loaded first? It will fail as it does now, making any quick fix unsupportable in practice. We therefore need to work with the VM team to come with a way to dynamically set this value, so that this parameter can be set on a per-applet basis. This won't be a quick fix, as there are always possible side-effects when one messes with key internal structures. thomas.ball@Eng 1999-02-01 dup as the more generic bug report 4222760 jerome.dochez@Eng 1999-05-26
01-02-1999