I'm beginning use the -Xmx option on the java command to allow my processes to use a little more memory (256Mb, though I think I'm currently using less than 128Mb). I've also noticed the -Xms option for starting memory, with a default value of 2Mb. What should I set this value to and why?
Reference: Java
...
Considering the following command line
java -Xms128m -Xms256m myapp.jar
Which settings will apply for JVM Minimum memory (Xms option) : 128m or 256m ?
...
I am running an application server on Linux 64bit with 8 core CPUs and 6 GB memory.
The server must be highly responsive.
After some inspection I found that the application running on the server creates rather a huge amount of short-lived objects, and has only about 200~400 MB long-lived objects(as long as there is no memory leak)
Aft...
The question pretty much says it all, I've been looking around for an answer even through the VM spec but I it doesn't explicitly state it.
...
Just started learning Java and I am confused about this whole independent platform thingy.
Doesn't independent means that Java code should be able to run on any machine and would need no special software to be installed (JVM in this case has to be present in the machine)?
Like, for example, we need to have Turbo C Compiler in order to ...
I have installed 64 bits RHEL. I have following questions regarding ant.jar for the system.
I was not able to find ant.jar build with 64 bit JVM from the apache website. Do I have to build it form the source code, if I intend to run the jar on 64 bit JVM?
Would it speed up the build process if I use ant.jar build with 64 bit JVM and ru...
I'd like to be able to compile a C/C++ library so that it runs within a managed runtime in the CLR. There are several tools for doing this with the JVM (NestedVM, LLJVM, etc) but I can't seem to find any for the CLR. Has anyone tried doing this?
...
I've used Concurrent Pascal, a tool which helps debug concurrent algorithms because when it runs your code, it randomizes which thread to swap to at every possible step, trying out as many paths as possible.
Is there a JVM that can do this?
...
Is there a utility (for Windows) that uses up memory so I can create a JVM "could not reserve enough space for object heap" error?
I want to use up this memory in a process outside of the JVM.
...
Is there any way we can access other JVM's Heap memory? Will this be possible if I know the memory reference/address?
...
Hello!
I want to ask which piece of code is more efficient in Java?
Code 1:
void f()
{
for(int i = 0 ; i < 99999;i++)
{
for(int j = 0 ; j < 99999;j++)
{
//Some operations
}
}
}
Code 2:
void f()
{
int i,j;
for(i = 0 ; i < 99999;i++)
{
for(j = 0 ; j < 99999;j++)
{
//Some operations
}
}
}
My teacher said tha...
I'm profiling a program using sampling profiling in YourKit and JProfiler, and also "manually" (I launch it and press Ctrl-Break several times to get thread dumps).
All three methods give me extremely strange results: some tens of percents of time spent in a 3-line method that does not even do any allocation or synchronization and doesn...
I'm using a COM dll provided to me by 3rd-party software company (I don't have the source code). I do know for sure they used Java to implement it because their objects contain property names like 'JvmVersion'.
After I instantiated an object introduced by the provided COM dll, all exceptions in my C# program cannot be caught by the VS ...
Hi,
My app shows rising 'Old Generation'/'Tenured Generation' size, and when this reaches the max limit for 'Old Gen', then suddenly PermGen size increases.
Here are my generation sizings:
-Xmx1200m -Xms1200m -Xmn450m -XX:MaxPermSize=600m -XX:+UseParallelGC
This is on 32 bit Fedora so can't have a bigger heap than this.
The app is n...
I can set the max memory as 1000 and not more than that, if I set the memory more than that, it throws the following error.
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
My question is, why jvm looks for the max memory at startup?
Thanks in advance....
Hi, today I just tried to play a little bit around with the opcodes in compiled java class file. After inserting
iinc 1,1
the java virtual machine responds with:
Exception in thread "main" java.lang.ClassFormatError: Truncated class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.de...
I think the JVM is similar to the .NET Framework, correct? Then what is the JRE?
Thank you!
...
I'm learning Java for a course this month, and this question is just one I thought of that I'd like to know.
What are the main differences between these two? I know KVM is targeted for mobile devices, correct?
...
Hey,
At work we found that on some instances (particulary the slow ones) we have a different behaviour, acquired at the reboot.
We guess a cache is not initialized correctly, or maybe a concurrency problem...
Anyway it's not reproductible in any other env than production.
We actually don't have loggers to activate... it's an old compo...
Hello !
I am really curious about how does the JVM work with threads !
In my searches in internet, I found some material about RTSJ, but I don't know if it's the right directions for my answers.
I also found this topic in sun's forums,
http://forums.sun.com/thread.jspa?forumID=513&threadID=472453,
but that's not satisfatory.
Can...