posted 20 years ago
Hi Zhao,
When the JVM is launched, the host operating system allocates an amount of memory to it. I understand that you want to change this amount of memory, from within the JVM, while it is running.
If this is the case, I don't think it can be done in pure java. You would most probably have to do this via JNI and the host operating system services.
While researching a similar topic, I found that your question has been asked several times already in the various java forums and newsgroups, but I failed to find an adequate response. Therefore, there's not much more I can offer you, sorry :-(
Hope this has helped you, anyway.
Good Luck,
Avi.