Re: How to minimize (unshareable) memory usage?

Andrew Haley <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
On 01/18/2010 09:40 AM, Justin Santa Barbara wrote:
> I have some simple Java utilities that I've written that need to run
> on machines with limited free memory, and I'm looking at GCJ for this.
>  Using the full Sun JVM we run into problems with memory usage - we're
> able to limit the heap to 8MB, but we need to allow at least 16MB for
> PermGen (despite not really having much application code), and at
> least 8MB for ReservedCodeCacheSize;  even a simple utility therefore
> needs at least 32MB of unshareable memory.
> 
> Running under GCJ the results are encouraging, but still not as good
> as I'd hope.  The output from pmap is included below.  The interesting
> ones are these four:
> 00010000  10404K rw---    [ anon ]
> b4125000   8192K rw---    [ anon ]
> b49d2000   8192K rw---    [ anon ]
> b7096000   6324K rw---  /usr/lib/libgcj.so.10.0.0
> 
> I've limited GCJ to 10MB of heap (it seems to need a little more than
> the Sun JVM for some reason), so that's the first entry.  But what are
> the two 8MB anonymous allocations that aren't the 10MB heap?   What is
> the 6MB of read/write libgcj mappings?

Hard to be sure, but propbably more heap.  To find out for sure I'd put
a breakpoint on mmap().

Andrew.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.