Allocated Heap v.s. Max Heap and OutOfMemoryError

In my application, I specify heap size like following:
-Xms384m -Xmx384m
I got few OOME error recently. From our monitoring tool, I can see the 'allocated heap' was only about 280 - 340MB range when OOME happened. That means that the used heap size were close or reach the 'allocated' heap size but not the max heap that defined in '-Xmx'. My question is:
Why does JVM act like this? What is the problem that prevents JVM from obtaining promised memory from OS?
We are using JDK 1.5
Thanks,
J

Its easy to check this, create as many threads as possible and configure a small heap size and a big stack size, count the number of created threads, then increase the heap and run the program again. Then you can see the number of threads increased too.
I have created a [java program to do exactly this, check it out|http://weblogs.java.net/blog/claudio/archive/2007/05/how_many_thread_1.html] .
See below, how thread stack size are allocated into the heap.
[http://java.sun.com/docs/hotspot/threads/threads.html|http://java.sun.com/docs/hotspot/threads/threads.html]
excerpt "TLEs (in 1.3) or TLABs (in 1.4) are thread local portions of the heap used in the young generation"
[Java Memory White Paper|http://java.sun.com/javase/technologies/hotspot/gc/memorymanagement_whitepaper.pdf]
For multithreaded applications, allocation operations need to be multithread-safe. If global locks were used to
ensure this, then allocation into a generation would become a bottleneck and degrade performance. Instead,
the HotSpot JVM has adopted a technique called Thread-Local Allocation Buffers (TLABs). This improves
multithreaded allocation throughput by giving each thread its own buffer (i.e., a small portion of the
generation) from which to allocate. Since only one thread can be allocating into each TLAB, allocation can take
place quickly by utilizing the bump-the-pointer technique, without requiring any locking. Only infrequently,
when a thread fills up its TLAB and needs to get a new one, must synchronization be utilized. Several techniques
to minimize space wastage due to the use of TLABs are employed. For example, TLABs are sized by the allocator
to waste less than 1% of Eden, on average. The combination of the use of TLABs and linear allocations using the
bump-the-pointer technique enables each allocation to be efficient, only requiring around 10 native instructions.

Similar Messages

  • How to set  max-heap-size outside the jnlp file?

    Due to bug_id=6631056 It may not be possible to specify max-heap-size within
    the JNLP file for certain jnlp java applications.
    Are there other possibilities to specify this Jvm parameter?
    In the ControlPanel there is the possibility to specify Xmx for applets but not for jnlp.
    I have tried to add properties like
    "deployment.javaws.jre.0.args=Xmx\=128M" without success
    Many thanks

    Even in JNLP also you can specify the max heap size
    <j2se version="1.5+" initial-heap-size="128m" max-heap-size="512m"/>
    Thanks,
    Suresh
    [http://sureshdevi.co.in|http://sureshdevi.co.in]

  • Java.lang.reflect.InvocationTargetException and OutOfMemoryError non heap

    Hi,
    After tomcat running 3,4 days well with 75 users, suddenly we are facing InvocationTargetException caused by OutOfMemoryError for 3,4 users some times. The JAVA_OPTS options are well configured as observed no heap error issue. Heap utilization is only 60% but Foud that CodeCache is reaching maximum. As codecache is no heap,so it may not provide outofmemory issue. Currently everyday outof production time we are restarting server to avoid sudden exception in production. The following is the exception we received as suggestion of finding the root cause.
    We are using XForms xslt & xpl's in which our spring integrated java dynamically compiled code will be called.
    ep 11, 2009 8:38:00 AM org.apache.jk.common.ChannelSocket processConnection
    WARNING: processCallbacks status 2
    08:38:00,202 WARN [PortletLocalServiceImpl:143] Portlet not found for liferay.com preferencetest_WAR_ops
    08:38:00,233 WARN [PortletLocalServiceImpl:143] Portlet not found for liferay.com preferencetest_WAR_ops
    java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor2049.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.orbeon.oxf.processor.SimpleProcessor$1.readImpl(SimpleProcessor.java:70)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
    at org.orbeon.oxf.processor.JavaProcessor$1.readImpl(JavaProcessor.java:66)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
    at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350)
    at org.orbeon.oxf.processor.pipeline.AggregatorProcessor.access$100(AggregatorProcessor.java:38)
    at org.orbeon.oxf.processor.pipeline.AggregatorProcessor$1.readImpl(AggregatorProcessor.java:93)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:368)
    at org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:387)
    at com.expeditor.processors.SingleTaskData.generateData(SingleTaskData.java:85)
    at sun.reflect.GeneratedMethodAccessor2048.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.orbeon.oxf.processor.SimpleProcessor$1.readImpl(SimpleProcessor.java:70)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
    at org.orbeon.oxf.processor.JavaProcessor$1.readImpl(JavaProcessor.java:66)
    at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:95)
    at org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96)
    at org.orbeon.oxf.portlet.OPSPortletDelegate.forward(OPSPortletDelegate.java:253)
    at org.orbeon.oxf.externalcontext.PortletToExternalContextRequestDispatcherWrapper.forward(PortletToExternalContextRequestDispatcherWrapper.java:35)
    at org.orbeon.oxf.xforms.XFormsSubmissionUtils.openOptimizedConnection(XFormsSubmissionUtils.java:108)
    at org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:768)
    at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:1283)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.OutOfMemoryError
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getDeclaredMethods(Class.java:1791)
    at org.codehaus.janino.ReflectionIClass.getDeclaredIMethods2(ReflectionIClass.java)
    at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
    at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
    at org.codehaus.janino.UnitCompiler.getIMethods(UnitCompiler.java)
    at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java)
    at o

    Hi,
    we have observed memory usage with probe in tomcat. Found no issue with non heap of permgen space. We are generating some dynamic classes which are around 30 for entire application. It is working for 3 days . Even in probe found that perm gen space is gradually decreasing.
    When perm gen outofmemory exception arrived (we reduced and tested ) in the logs we are getting the Error specifying it is OutOfMemory because of PermGen space not enoug.
    But CodeChache is reaching it's maximum as observed in probe and Error message is as above withou heap/perm gen/ other details.

  • JVMTI agent and max heap

    Running an app with a JVMTI agent attached, I cannot specify a max heap greater than 320Mb, even on a 1Gb machine with hardly anything running. Specifying for example -Xms256m -Xmx512m results in following error:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    Anyone any ideas?
    Thanks,
    Luc

    This appears to be a duplicate of this post:
    http://forum.java.sun.com/thread.jspa?threadID=755278&tstart=0

  • Setting max heap in Oracle JVM

    Hello -
    I'm having a problem with a Java stored procedure running out of heap memory in Oracle 10g running Java 1.4.
    Normally (running Java in a standard context) I would just modify the -Xmx with a higher value, but for the life of me I can't figure out how to do it in a stored procedure context.
    I have browsed Google and I have browsed the Oracle JVM installation stuff, all to no avail.
    Can anyone help me with how to set my max heap size, or verify that it's impossible? I have taken all of the standard Oracle memory parameters (JAVA_POOL, UGA/PGA/SGA limits) out of the picture by jacking them up and keeping an eye on memory values up to the point that the procedure fails (at ~700m), so I'm pretty sure that this is my problem.
    So far I have looked at:
    Config files
    Config tables
    DB parameters
    I haven't been able to find anything remotely related to JVM option configuration in any of the above.
    It is worth noting that I ran across another forum where someone was wanting to set their minimum heap size, and they were told that it was not possible. I'm just having trouble believing that it's the same story with something as critical as max heap size.
    Much obliged for any help.
    Thanks,
    Annaka

    From Metalink Note 466112.1:
    Applies to:
    Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 10.2.0.3
    This problem can occur on any platform.
    Symptoms
    When attempting to execute a java class that works fine in a stand alone JVM, fails with Oracle JVM with the following error:
    ERROR
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.OutOfMemoryError
    ORA-06512: at "IDS_SYS.POD", line 3
    Cause
    The MaxMemorySize was set 256M (the default values) where the JSO needs memory more than 256 MB to run.
    This can be checked as following:
    SQL> create or replace function getMaxMemorySize return number
    2 is language java name
    3 'oracle.aurora.vm.OracleRuntime.getMaxMemorySize() returns long';
    4 /
    Function created.
    SQL> select getMaxMemorySize from dual;
    GETMAXMEMORYSIZE
    268435456
    After increasing the MaxMemorySize to a larger value(1 GB), the problem was fixed
    Solution
    Please increase the MaxMemorySize to a larger values(i.e. 1GB), this can be done as following:
    SQL> create or replace function setMaxMemorySize(num number) return number
    2 is language java name
    3 'oracle.aurora.vm.OracleRuntime.setMaxMemorySize(long) returns long';
    4 /
    Function created.
    SQL> select setMaxMemorySize(1024*1024*1024) from dual;
    SETMAXMEMORYSIZE(1024*1024*1024)
    Then you can check if the value is set correctly using the following:
    SQL> select getMaxMemorySize from dual;
    GETMAXMEMORYSIZE
    1073741824
    In my case I had to set the parameter within a job's the session.
    bye
    TPD
    Edited by: TPD on Sep 23, 2008 4:27 PM - tags added

  • Does the jvm allocate complete max heap size initially?

    Does the JVM allocate the memory for the entire max heap size up front, or does it start with the specified minimum size and increase and grab more later if needed?
    The reason this is being posted is because we have a number of jboss servers that are being run. Some don't require large heap sizes, others do. If we use the same large max heap size for all would all the memory get allocated up front, or possibly a smaller initialization portion?

    I have done the test with Solaris, Linux and WinXP.
    Test with -Xms512M
    Have written a simple java program to which the minimum heap size was set to -Xms512m then the program was executed on Solaris and WinXP platforms. The usage of memory of the Java process was 6 MB in WinXP and 9 MB in Solaris, rather than 512 MB. The JVM is not allocating the configured minimum size of 512 MB at the start of the process execution.
    Reason:
    If you ask the OS for 512 MB it'll say "here it is", but pages won't actually be allocated until your app actually touches them.
    If the allocation is not being made initially during the start of the process, the concept of minimum heap size is not required.
    But the garbage collection log shows the minimum heap size as what was configured using -Xms option.
    Test with -Xms1024M
    The JVM arguments was set to : -Xms1024m -Xmx1024m, but the used memory observed using Windows perfmon was 573M.
    6.524: [Full GC 6.524: [Tenured: 3081K->10565K(967936K), 0.1949291 secs] 52479K->10565K(1040512K), [Perm : 12287K->12287K(12288K)], 0.1950893 secs] Reason:
    Optimization is something that the operating systems do. The JVM allocates the memory in it's address space and initializes all data structures to your -Xms. In any way that the JVM can measure, the allocation from the OS is complete. But the OS doesn't physically assign a page to the app until the first store instruction. Almost all modern OSs do this.
    Hope this is helpful.

  • Max heap limited when running with a JVMTI agent?

    Running an app with a JVMTI agent, I cannot specify a max heap greater than 320Mb, even on a 1Gb machine with hardly anything running. Specifying for example -Xms256m -Xmx512m results in following error:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    No problem at all with a JVMPI agent.
    Anyone any ideas?
    Thanks,
    Luc

    JVM TI agent libraries are loaded very early in the startup and before the java heap is reserved. JVMPI agents, on the other hand, are loaded much later in the startup. You didn't mention which operating system this is but I assume it's Windows. If so, then you may need need to rebase the agent DLL to allow the java heap be reserved.

  • Plug-in max heap space for IE on Windows Vista

    G'day,
    The organisation I work for will be moving from Windows 2000 to Windows Vista later this year.
    We'll be including JRE6 as part of the standard desktop installation :-)
    Ahead of that I'd like to know the default maximum heap-space configuration for JRE6 running in IE7 on Windows Vista.
    Elsewhere I've read it's as low as 64M (!)
    http://forum.java.sun.com/thread.jspa?forumID=30&threadID=5168556
    If it's this low I'll need to make sure our JRE6 install is tweaked to increase its max heap space (-Xmx)
    Thanks,
    Chris.

    Hi Kenneth,
    It is not necessarily for posting if you feel this write-up is too detailed. First I want to let you know that I am a novice just trying to help MYSELF, JAVA and others with the same or similar problem. This is going to be a very long post, just like one you (kbrussel) posted about this problem. I realize it may be unnecessary but maybe HARDWARE could be the problem so I listed all my hardware. More Data is better than LESS data I feel!
    Background: I have the identical problems on 2 different Gateway Models over almost a year.
    System # 01 is an Older Gateway Computer 838GM (Media Center) Pentium 4 - 630 HT Processor 3.0 GHz/2MB Cache, 1.536 GB of RAM (1.49GB Recognized) PC3200 with 800 MHz FSB and 200 GB Hard Drive running Windows XP Media Center 2002 SP2 with all latest updates (Actually I was told it is XP Professional plus additional programs for media) and a GMA900 on-board Video outputting to a Gateway EV700 CTR Monitor using a Linksys Cable Modem Model: BEFCMU10 Version 4.0 and Comcast Broadband ISP for Internet Connection.
    System # 02 is a Newer Gateway Computer GM5457E (Media Center) Core 2 Duo Processor E6320 1.86 GHz per CPU Core @ 1066 MHz FSB/4MB Cache, 4.096 GB of RAM (3.405216GB Available to Windows) PC5400 with Intel 945G Chip Set, a SATA II 500 GB Hard Drive running Windows Vista Home Premium V 6.0 (Build 6000) and an NVIDIA GE Force 7500LE Video Card outputting DVI to a new Acer AL2223W HDLCD 22" Monitor using a Linksys Cable Modem Model: BEFCMU10 Version 4.0 and Comcast Broadband ISP for Internet Connection.
    I am a high volume quick trading new "day trader" (actually a "minute" trader) and I have been having an "EXTREEME" problem over the past 10 months, maybe longer, with my older and my newer computer SYSTEMS of locking up (looping, I think, nothing using JAVA seems to work, totally locked) when running JAVA based TD Ameritrade�s "Command Center 2.0". During early very FAST trading minutes (usually 9:30 AM to 10:00 AM) with all functions (limited to 6 each functions each by TD Ameritrade), maybe 20-28 windows working at the same time. I use "Charts, Last Sales, Level II, Watch Lists, Trade Tickets, Actives", as a "DAY-TRADER". The JAVA plug-in providing "streaming" data to my older computer was unreliable, always locking-up. I bought a totally new computer system after I was told by TD Ameritrade TECHNICAL that "IT COULD BE MY OLDER COMPUTER". I bought a new computer, and the same problem, lock-up on this computer with CPU usage between 52% and 59%. I have spent over 12 hours with many different TD Ameritrade technicians trying to help me. I have tried both foxfire and IE and problem is on both. I place a buy order trade and then I need to sell it in less than a minute some times. I can not afford for JAVA to lock up on me for any number of SECONDS while I am trading, and JAVA has done that to me so many times I can�t count. By the time that I "End Task" and then re-open my account I can be down (LOST) several thousand dollars. This only happens when the market is trading furiously and JAVA can�t keep up, at least on my computer. I have tried all modification fixes that TD Ameritrade technicians have given me, and some on your blog http://forum.java.sun.com/profile.jspa?userID=523605), and some fixes from other sites that have been recommended, but I still fear that the problem is "not fixed". I have set -Xmx to "-Xmx100m" and Temp Internet Files to 100 MB. This has worked so far for me all day today but the stock market was not TOO busy and I did not have my second trading account up as I usually do. I think the problem is amplified when the "Market Volume" is very high, meaning that the data is constantly streaming so fast that either JAVA or my computer cannot keep up. I also noticed that there is a totally new version of JAVA (http://www.java.net/download/jdk6/6u10/promoted/b11/binaries/jre-6u10-ea-bin-b11-windows-i586-p-24_jan_2008.exe), do you think I should try this version?? , I had version 6 I think rev.4 a while ago and it failed too. Is this version 6 newer than a month or so ago ??? I am now running 1.6.0 (build 1.6.0_03-b05)
    I have not tried all solutions on you list of "ALL" but this fix seems to work so far, that is I set parameters to -Xmx100m works for me so far, just one day. I will let you know of new failures or continuing good operation,
    Thanks Russ Bower [email protected] I NEED THIS JAVA program TO WORK RELIABLY. Also it seems to be a problem on SCOTT Trade also from a blog I visited, several people claiming it is a JAVA bug.

  • Setting System-Wide Max Heap Size

    We want to set the heap-size of Java-Plugin 1.5.0_14 for a company-wide rollout to a fixed size under Windows XP.
    In deployment.config under C:\Winnt\Sun\Java\deployment I am giving this:
    deployment.system.config=file:C:\\WINNT\\Sun\\Java\\Deployment\\deployment.properties
    deployment.system.config.mandatory=true
    In the respective deployment.properties I am giving
    #deployment.properties
    deployment.cache.max.size=50m
    deployment.javapi.jre.1.5.0_14.args=-Xmx256m -Xms75m
    While the cache-parameter is taking effect (visible in the Java Control Panel) there is no change in the Max Heap Size.
    Any idea how this could be achieved?
    Thank you
    Michael

    MaxHeapSize I determine with Runtime.getRuntime().maxMemory()
    Setting it manually in the javacpl via -Xmx works fine but....
    Problem is that we do not want each user to open his Java Control Panel and set this value manually.
    May be error prone and difficult to communicate in a scenario where you have hundreds of users in different locations, countries etc.
    Should be possible to set this value once installing the Java Plugin
    Thank You
    Michael

  • Siginficance of max heap size mentioned in configtool

    Hi all,
    could anyone please tell me the exact significance of
    max heap size mentioned in configtool in SAP Netweaver in
    <b>1)Instance_ID</b>
    -servers general
    -message servers and bootstrap
    <b>2)Dispatcher_ID</b>
    -general
    -bootstrap
    <b>3)Server_ID</b>
    -general
    -bootstrap
    Which of these do i change to improve the performance?
    I tried changing the max heap size specified in
    <b>Server_ID</b>
    -general
    but i got the following error while trying to start the server  in std_server0.out:
    node name   : server0
    pid         : 3452
    system name : N02
    system nr.  : 01
    started at  : Tue Mar 20 21:53:37 2007
    Reserved 1610612736 (0x60000000) bytes before loading DLLs.
    [Thr 1912] MtxInit: -2 0 0
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Regards,
    Namrata.

    Hi,
    The biggest impact to runtime performance will be adjusting the heap size of the server JVM. This is done in Server_ID->general.  The JVM parameters entered here take precedence over parameters in Instance_ID->servers general.  The server job by far do the most work in the Java engine and so it is very important that the JVM for the server node is tuned to handle the workload.  Tuning the server JVM or even adding additional server nodes is dependent on the workload and the amount of work on the system.
    Adjusting the heap for the other JVMs will have much less of an impact than adjusting the heap in the server JVM.
    The dispatcher JVM heap settings may have a slight impact during runtime, but compared to the server jobs the dispatcher does relatively little work.  Depending on your situation you may need to tune the dispatcher a little, but my experience has been that the default value for the dispatcher is usually sufficient.
    The values for all of the bootstrap jobs may have an impact on startup time, but they will have no impact on runtime since these jobs go away once the system is up.  From what I have seen the defaults values for the bootstrap jobs are sufficent.
    I never adjust anything under Instance_ID, I'm not sure what these parameters are used for except for maybe default values when adding server nodes.  Maybe someone out there knows.
    Hope this helps.
    Regards,
    Kolby

  • How do define the limit of the max heap size?

    Hi All,
    I would like to know what should be the limit of the JVM max heap size.
    What will happen if we will not define it?
    What is the purpose of defining it from the technical point of view?
    Thanks
    Edited by: Anna78 on Jul 31, 2008 12:36 PM

    Defining a max heap space too large can have the following effect:
    If you create new objects, the VM may decide it is not worth getting rid of garbage-collectable ones, as there
    is still plenty of space between the current heap size and the max allowed. The result will be that the
    application will run faster and will consume more memory than it really needs.
    If the heap size is too small, but still sufficient, the application will do a lot of garbage-collection and therefore
    run slower. On the other hand, it will stay inside the tight space it has been allowed to use.
    The speed difference may or may not be noticeable, while the difference between 256M and 512M may
    or may not matter on today's computers.

  • Java vm creation crashes if max heap is set too big

    I start the jvm from deep within a c / fortran app. If I give a "decent" max heap size w/ -Xmx option, everything is fine. However, the JNI_CreateJavaVM crashes w/
    Unhandled exception at 0x060b766b (jvm.dll) in tnapa.exe: 0xC0000005: Access violation reading location
    0x00000ff1.
    The violator being:
         jvm.dll!_findNonConsecutive() + 0x18b     if I give a large (e.g. -Xmx1g) max heap size. I first suspected that this is our own code that messes up some memory before the jvm gets into the picture (and still consider this a strong possibility). However, when trying to solve the problem, I looked at the reported memory location w/ MS Visual C++ debugger, and it showed ?? for values there. I could not find it in the documentation, but my coworker said it means that memory is outside of the scope of the process in question. This makes it sound like jvm is trying to access illegal memory areas. Could this be a jni bug?
    Environment:
    jdk 1.5.0_09
    win xp sp 2
    ms cl compiler (/MD flag is used in compilation)
    2GB of ram
    The jvm is loaded dynamically, i.e. the reference to the func JNI_CreateJavaVM is fetched from the jvm.dll, which is loaded lazily, i.e. just in time when needed for the first time. A proper typecast is done to ensure that JNICALL calling convention is used.
    -Antti-

    Sorry, blaming the wrong horse here... the jvm in use was actually jrockit (BEA JRockit(R) (build R26.4.0-63-63688-1.5.0_06-20060626-2259-win-ia32, jdk 1.5.0_06).
    W/ sun jdk everything is fine. Well, at least it does not crash, it just fails due to not enough memory.
    -Antti-

  • "Could not create the Java virtual machine." when max-heap-size is 926Mb

    We received "Could not create the Java virtual machine." when the max-heap-size provided exceeded 926 Mb in XP PC. We found the below mentioned link which confirms that this is a bug
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6945136
    But the problem is that the issue does not get recreated in all the XP PCs. Increasing the max heap size to greater than 926 works fine in some XP PCs.
    Could there be any configuration related issues for this problem...

    If you can't find any difference in your java versions or overall runtime configurations, it's quite possible that the bug doesn't have the complete picture--it might be more subtle than the conditions described. Maybe it works with certain versions of certain lower level DLLs. Maybe it has some dependency on which services are running. Maybe the order in which certain components got installed put one version of something vs. another further ahead in a CLASSPATH, LD_LIBRARY_PATH, etc. variable.
    Or maybe it's as simple as you're not running the version of Java you think you are on all those boxes, as jschell suggests.
    Regardless of the reason why it happens to work on some configurations, you found that it fails on some, and that failure is in fact a known bug. So it shouldn't surprise you that it fails at least sometimes, and the fact that it works sometimes has been rendered irrelevant. Unless you're doing research into the specific cause of this issue.

  • Max-Heap deletion

    I'm studying for a Data Structures midterm and one of the questions is making a delete algorithm to delete element e from a max heap. Just wondering if anyone could help me with how this is done. The method should be able to delete from any part of the heap. I know how to delete the max value (remove the max, move the min value to the top and downheap) -- I'm just not sure how I would implement this if the element I wanted to remove was in the middle of the heap. Any help would be greatly appreciated.
    Thanks

    Are you referring to the Java Heap, which is used for memory management? If so, you cannot manage the heap in this way, it is up to the garbage collector for the particluar JVM.
    If you are referring to an array or hastable or collection of some sort, which collection are you referring to?
    Don

  • Max heap size limits

    I've been looking around for information on the max heap size limits on Sun's JVMs but can't seem to find any information. Just by testing, it seems like the max heap size for Windows 2000 can vary from 1.3G to 1.6G depending upon the machine (JDK 1.4). Does anybody know where I could find actual documentation that describes the limits for Sun's VMs on Windows (2000 and Advanced Server), Linux, and Solaris? I'm about to file this as a documentation bug against the JDK.
    God bless,
    -Toby Reyelts

    There was an older thread in the forums that had some info on this - my quick search failed to locate it, ypu might want to spend some time looking. The basic problem is memory space fragmentation by the OS, where the OS locates items in memory and effectively constrains heap growth to the unfragmented area that the heap starts in.While there may be more "unused" memory, it's not contiguous. There is also some info in MS's MSDN data regarding this condition, with information on the various OS's. I think Linux has a similar "condition".

Maybe you are looking for

  • Get column values from list of values programmatically

    hi all how i get column values from list of values programmatically in the returnPopupDataListener method

  • My ipad had been stolen for 2 weeks and the tracking shows its offline what should i do to find it now please help

    i want to find my ipad but its offline till now and i dont now what to do else over tracking it by my account please do something <Edited By Host>

  • About to Buy The iMac (Stop Me?)

    I am about to buy the iMac, possibly today. I was wondering a couple of things. -Should I wait for 10.5 to come pre-installed on them? -How are they, work wise, look wise, function wise (for the owners)?

  • Cisco AVpair

    Hi, I want to authenticate my pppoe clients using a radius server. PPPOE client sending a username and password as well as a Service Name (which is detected in Router debug as Service Tag <service name>. I want to send this Service Name (Service Tag)

  • Wrapping Objects Problem

    I am trying to wrap text around my object which is aligned on the left side of the page. After choosing the "object causes wrap" my object disappears partially off the page. Is there a margin somewhere that I can't find? (It doesn't happen when using