• Post Reply Bookmark Topic Watch Topic
  • New Topic

Running out of memory  RSS feed

 
William Barnes
Ranch Hand
Posts: 1049
2
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a client which sends a request, gets the response, and ends. It is not a long running process. It is not a daemon.

When the response is really large my client can run out of memory and die. So I have been trying to figure out what to set my intial and max memory settings at. I have found a max value which works, the thing I don't understand is why changing the initial value makes any difference. If I don't set the initial value high enough I can run out of memory - this is without changing the max value.

(The following are only example values) So setting intial to 50meg and max to 150meg works fine. But lowering the intial value to say 25meg causes my client to run out of memory and die. This doesn't make any sense to me.

Any ideas?
 
Nick Gusev
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, not only you (program) need to be able to allocate memory. You need to be able to allocate it on time. This is the reason. For more info look for 'permanent generation'.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!