Controlling Memory Usage from JLink
- To: mathgroup at smc.vnet.net
- Subject: [mg107733] Controlling Memory Usage from JLink
- From: Alexey <lehin.p at gmail.com>
- Date: Thu, 25 Feb 2010 01:51:14 -0500 (EST)
Hello, I need a way to control the real memory usage by MathKernel for preventing swapping on my machine. I am totally disappointed MemoryConstrained[] (sometimes it works, sometimes fails). I have not used JLink before and know nothing on Java language but googling "controlling memory usage from Java" told me that it is probably possible to get information on the amount of Virtual memory used by particular process in Java. If it is true, my question is: how? This question is addressed to anyone who knows Java and JLink. If it is not, I would be grateful for any working suggestions. At this moment I know only one way: by using console utility pslist.exe from Sysinternals. But it requires loading pslist.exe every time I need to know the memory usage. I think that it is not very good to launch this utility 4 times per second...