Bookmark Topic Watch Topic
  • New Topic

How to allocate the memory from OS instead of increasing the JVM’s heap size?

 
Linda Wua
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
I need to detect whether the file I am attaching to an email is exceeding the server limit. I am not allowed to increase the JVM heap size to do this since it is going to affect the application performance.

If I don’t increase the JVM heap size, I will run into OutOfMemoryError directly.

I would like to know how do allocate the memory from OS instead of increasing the JVM’s heap size?

I can read the file size before uploading the file to the server. However, the server team does not have an API in place to tell me what is the server policy in terms of what is the max file limit. I have to stream the file to the server and have it determine whether the file has exceeded the limit. This is not efficient. Since I can't increase the JVM heap size, how could I allocate the operating system memory to do this?

Thanks a lot.
 
Paul Clapham
Sheriff
Posts: 21875
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
"Java Doe", please check your private messages regarding an important administrative matter.

Thank you.
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same topic multiple times. Lets continue the discussion here.
I am closing this topic.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!