GC Warning: Header allocation failed: Dropping block.

Boehm, Hans hans.boehm@hp.com
Thu Feb 17 12:15:00 GMT 2005


It means that the garbage collector's attempt to obtain more memory
from the OS (on Linux it uses sbrk() or mmap()) failed.

By default the GC uses as much memory as it thinks it needs and the
OS will give it.  Try running with the GC_PRINT_STATS environment
variable defined, and see what that says.  Also keep something like
"top" running to see whether you are really running out of
memory/swap space.  (I'm assuming a Linux environment.)

In general, for a large Java heap, you are better off running
a recent gcj.  And ideally the collector should be built with
-DLARGE_CONFIG, which I don't think it is by default.

Hans


> -----Original Message-----
> From: java-owner@gcc.gnu.org [mailto:java-owner@gcc.gnu.org] 
> On Behalf Of Yura Smolsky
> Sent: Wednesday, February 16, 2005 11:44 AM
> To: java@gcc.gnu.org
> Subject: GC Warning: Header allocation failed: Dropping block.
> 
> 
> Hello, java.
> 
> I am user of PyLucene lib. It's port of java Lucene library 
> to Python. And there is PythonThread which is really a 
> wrapper around a Java/libgcj thread that python is tricked 
> into thinking it's one of its own.
> 
> 
> My code creates like 10 threads of this type. Each thread has 
> reference to PyLucene's IndexSearcher object which size is 
> very huge, like 400-800M.
> 
> When It creates many threads of this type and uses object 
> IndexSearcher then I receive following exceptions: GC 
> Warning: Header allocation failed: Dropping block or GC 
> Warning: Out of Memory!  Returning NIL!
> 
> 1. What does this errors mean?
> 2. When I decrease amount of threads to 2 or 3 then these 
> exception are gone. Why? 3. How can I specify the total size 
> of memory which can consume gcj threads or the whole process?
> 
> Thanks.
> 
> Yura Smolsky.
> 
> 
> 



More information about the Java mailing list