Re: OutOfMemoryError in my Java app
Re: OutOfMemoryError in my Java app
- Subject: Re: OutOfMemoryError in my Java app
- From: Greg Guerin <email@hidden>
- Date: Thu, 2 Nov 2006 12:17:39 -0700
Paul Archibald wrote:
>I am still trying to figure some issues that bother me, and I am not
>sure just bumping up the memory is a good solution. For one thing, if
>you set the memory too high, the app refuses to launch, which is Not
>A Good Thing.
How high is "too high"?
There are limits to the size of the Java heap. Search Java-Dev archives
for keywords like max heap size.
How big are the big arrays you're trying to create?
Maybe you should consider a 64-bit memory space, which Mac OS X Java won't
provide until 10.5. So you might have to get the 10.5 preview.
Your other option would be virtualizing the huge arrays using Java code.
You might find a library to do this by googling for keywords like java
virtual arrays. The NIO package offers memory-mapped files which can back
arrays, so it'll probably be something using NIO classes, so nio is another
keyword.
>This is not an Xcode question, but do OS X apps have a memory
>partition setting like the pre OS X apps? I don't see that
>information as part of the Finder's Get Info result.
The JVM uses memory in a different way than other apps do. Setting the JVM
heap max isn't the same thing as setting a memory partition size.
To learn more about Java's memory model and heap, and tuning it for
performance, google for keywords like java heap tutorial performance.
Search Java-Dev archives for similar terms, too.
Finally, you might get additional answers to your Java questions by asking
on the Java-Dev list. Some folks subscribe to both, but some don't, and
almost everything you've asked so far is solidly on-topic for Java-Dev.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden