Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8335469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:41:10+00:00 2026-06-09T03:41:10+00:00

i got an strange issue with outOfMemory errors. i had written a application, which

  • 0

i got an strange issue with outOfMemory errors.
i had written a application, which have in some parts heavy memory usage.
on my laptop (linux, 64bit, eclipse indigo, vmargs: xms:40, xmx:512, 4gb physical ram) the application runs without any problem..
on another pc (WinXP SP3, 32bit, eclipse juno, vmargs: xms:40, xmx:1024(!), 2gb physical ram) the application terminates with the stated error in title.
both machines are using the java 7 jdk of oracle.
how is this possible, that the application fails on the another pc, which has more heap space, than my laptop.
i developed the application on my laptop… but i think this should not be the cause for this error, right ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:41:11+00:00Added an answer on June 9, 2026 at 3:41 am

    The 32 and 64 bit versions of Hotspot Java have different policies about how to determine the default maximum size for the heap. On 32 bit JVMs, a fixed default heap size is used. On 64 bit JVMs, the heap size depends on the amount of physical memory on the system.

    The solution is to set the maximum heap size explicitly using the java command’s -Xmx option.


    In your case you are already using the -Xmx argument, and (apparently) you are using a larger value on the 32 bit platform … and the 32 bit version is dying first! I can think of a number of possible explanations (in decreasing likelihood):

    • Your 32bit machine doesn’t have enough swap space, and cannot meet the JVM’s request for more memory when it tries to grow the heap.

    • Your application is figuring out how much memory is available and adjusting its behaviour accordingly … but is getting it wrong in the large memory case.

    • There is some difference in the input to the application in the two scenarios, and that is causing the problem.

    • The application is using memory mapped files (or something else like that) which are using up a significant proportion of your address space … reducing the address space available for the heap. On a 64 bit machine, you have many gigabytes of address space, but on a 32 bit Windows XP machine your application’s address space will be limited to ~2Gb by the OS and the instruction set / hardware architecture.

    (Your changing description of the problem is not helping …)


    If you are launching the application from Eclipse, it is possible that you are confusing the -Xmx setting used by the Eclipse JVM with the -Xmx setting used by the JVM that runs your application. If you don’t set the -Xmx options explicitly in the application’s launcher configuration … it will use the default heap size!!


    In response to your comment:

    but i have to implement an application which will be included as a jar in another project, which is a eclipse plugin..

    For an Eclipse plugin, the JVM size is determined by the parent Eclipse. Your plugin has no say in the matter. If your plugin requires a lot of heap space, you need to get the user to adjust the Eclipse heap parameters by hand.

    If you are launching that Eclipse instance from another Eclipse instance … I’m not sure if the application launcher parameters would have any effect. But this should only matter to you (and others) who are developing your plugin.

    (In the case of an executable JAR file, it is not possible to specify the heap size in the JAR manifest. But there are other options – see Can I set Java max heap size for running from a jar file? .)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got a very strange input issue in which it seems that my
I've got a strange issue with some memory tables I'm running on RDS. I
I've got a strange issue. I've setup XDebug to profile a PHP application we're
Got a pretty strange issue here, maybe someone had similar experience. When loading http://magento.dev/index.php/cmd/sales_order_status/
Ok so this is kind of a strange issue, but I have got two
I've got a strange problem which I just can't figure out. I have currencies
I've got a strange issue with a google map, which I can only duplicate
I've got a strange issue. I have a class that inherits from RelativeLayout .
I've got a strange issue with some Coldfusion/SQL Query output. The actual data is
I've got a pretty strange issue in my first try of using Entity Framework

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.