• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
java.lang.outOfMemoryError (completely SOLVED)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

java.lang.outOfMemoryError (completely SOLVED)


  • Subject: java.lang.outOfMemoryError (completely SOLVED)
  • From: Ricardo Strausz <email@hidden>
  • Date: Fri, 25 Jul 2003 18:48:53 -0500

Hola a tod@s.

Finally completely solved; the problem was that, processing tons of db-data in a Cocoa/EOF app, the JVM runs out of memory. The behavior was unexpected, but sometimes it throws an exception: "java.lang.OutOfMemoryError".

The first solution (first suggested by Chuck Hill) was to use NSAutoRealesePool; I found out that, surprisingly for me, the Java Bridge does a very good work on that: it uses the Garbage Collection in the Java side and retain/release paradigm in the ObjC side, and does it well (you do not have to take care of more details... as I did, erroneously ;^().

However, the question of assigning more RAM to the JVM was still open, and the Apple's document http://docs.info.apple.com/article.html?artnum=75496 was not of much help (it may work for WO and JavaClient, but not in Cocoa/EO). However it suggested the actual solution: in Project Builder, under targets and with the main target selected, go to Info.plist Entries > Pure-Java Specific and add in the "Additional VM Options" text field something like

-Xms256m -Xmx256m

(This will give to your JVM 256Mb of memory instead of 64Mb, the default.)

Hope this will help future developers of the fascinating Cocoa/EO environment.

Suerte!

Dino
http://homepage.mac.com/strausz

p.s.: Is Apple going to support Cocoa/EOF in the near future ;^? May be in "WO to Panther"??
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: EOModeler Connection Error
  • Next by Date: Re: EOModeler Connection Error
  • Previous by thread: Re: EOModeler Connection Error
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread