[Biojava-l] Java Resource Management [a semi troll...]
Thomas Down
td2 at sanger.ac.uk
Tue Feb 11 12:26:15 EST 2003
On Tue, Feb 11, 2003 at 10:48:05AM +0000, Phillip Lord wrote:
>
> In short, using all the memory you possibly can, but without actually
> crashing the JVM is fairly hard in Java. Or, if I am more honest, I
> never found a good way of doing it. Perhaps someone else has.
To be honest, I'd say that this problem is fairly hard in
*any* language, if you want to maintain some semblance of
portability. Different OSes, and even different site-tuned
versions of many kernels, have significantly different views
on virtual memory, paging, and how acceptable it is to
overcommit memory. On Linux, I can look at /proc/meminfo
and get some clues, but that's not even portable to other
Unices :-(. Actually, even from a kernel's point of view
dealing with memory-constrained conditions is Hard. Right now,
for applications which want to live on the edge, it's probably
still better to leave the decision to the user *sigh*.
It would be nice if Hotspot was slightly less aggressive at
clearing SoftReferences, though...
Thomas.
More information about the Biojava-l
mailing list