Java
How is it ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
How is it possible (if it is) to allocate more memory for the Java Virtual Machine.
JVM should be started with a -Xmx key followed by a specific amount of memory. For example -Xmx256m.
A Runtime.getRuntime().maxMemory(); method should be called and JVM will automatically increase the maximum amount of memory.
It is not possible to allocate a specific amount of memory to JVM, it will be determined automatically depending on the amount of RAM.
Explanation
In order to allocate a specific amount of memory to JVM it should be started with certain keys. For example, a -Xmx key specifies the maximum amount of memory, while a -Xms key specifies the initial amount of memory.
java virtual machine
memory
1
(1)
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
Select a Java disassembler that is included into a standard JDK....
The following class was launched with a -ea key. What is the result of following...
How can an object be destroyed in Java?...
What is JRE?...
Is guaranteed that the garbage collection will start after calling Runtime.getRu...
J
ava
Quiz
Login to learn Java
or
Read more about
Java Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Java quizzes
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
int i = Integer.MAX_VALUE + 10; What is th...
What happens after the following code is compiled and run: ...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment