Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

OutOfMemory

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
i have a question about OutOfMemory Error.
In my application when I toggle between two windows the JVM is always allocating new memory til it reaches about 64 MB. After that it doesn't rise anymore. When opening other windows in the application, the memory will stay at about the same level. but then the whole application is very slow and after a while I will get the OutOfMemory Error. Sometimes earlier, sometimes later. Any ideas about maybe garbage collection or finalization???
any help appreciated.
Lars
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to call System.gc() and finalize unused objects.

Hi there,
i have a question about OutOfMemory Error.
In my application when I toggle between two windows the JVM is always allocating new memory til it reaches about 64 MB. After that it doesn't rise anymore. When opening other windows in the application, the memory will stay at about the same level. but then the whole application is very slow and after a while I will get the OutOfMemory Error. Sometimes earlier, sometimes later. Any ideas about maybe garbage collection or finalization???
any help appreciated.
Lars

 
Lars Vegas
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when running System.gc() and finalization, nothing happens. maybe just a little bit of memory is released, but not much. that doesn't seem to work.
 
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe your problem is of the same nature as the one discussed here.
Eugene Kononov.
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have seen the garbage collector run when the application needs more heap..and that is one of the reasons it is slowing down. Usually I check the memory of the process and collect the max memory it needs and then set the max heap size. Hope this helps.
 
Lars Vegas
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've senn the discussion about dispose(), but that doesn't help either.
Maybe we have some references in the program that are not garbageCollected. I just don't know. anyway, if someone has an idea what might cause this problem, don't hesitate to let me know.
Thanx in advance.
 
Lars Vegas
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've senn the discussion about dispose(), but that doesn't help either.
Maybe we have some references in the program that are not garbageCollected. I just don't know. anyway, if someone has an idea what might cause this problem, don't hesitate to let me know.
Thanx in advance.
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic