[Gc] GC Warning: Repeated allocation of very large block
hans.boehm at hp.com
Mon Oct 30 11:46:27 PST 2006
Unfortunately, it's debatable whether the collector runs perfectly
correctly when this happens. This message is only printed if the
collector has significant reason to believe that you will be leaking
large blocks of memory, as a result of allocating objects larger than
what it can place between known "false pointers". Hence the block will
be allocated, but is likely to remain pinned for the rest of the
process. Things will continue to work for a while, but often not
I think the warning is currently only printed after allocating 5 such
blocks, suggesting that this is being repeated often enough to be a
serious issue. You might look at the GC_PRINT_STATS log to see whether
it really appears benign. Repeated sequences of heap expansions without
an intervening GC are generally suspicious.
If you are seeing this on a 64-bit machine, we should investigate. On a
32-bit machine, this is unfortunately hard to avoid in general. We
could see where the false references are coming from, and try to avoid
those. But I think there's no easy way out.
You should also remember that allocating a 2MB block in a
garbage-collected setting is expensive, no matter what the collector.
The collector cost is roughly the same as allocating 20,000 100-byte
blocks. If you are allocating a bunch of these in a row, it's probably
worth thinking about ways to avoid that.
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Andrew Haley
> Sent: Monday, October 30, 2006 3:35 AM
> To: mijobee at mijobee.com
> Cc: gc at napali.hpl.hp.com
> Subject: Re: [Gc] GC Warning: Repeated allocation of very large block
> mijobee at mijobee.com writes:
> > Hello Everyone,
> > I was hoping to get some advice on getting rid of the
> following > warning message:
> > GC Warning: Repeated allocation of very large block (appr.
> size > 1986560):
> > May lead to memory leak and poor performance.
> Yeah, it's very annoying. Several times I've tracked this
> down and it's turned out to be something perfectly benign
> such as the creation of a large array. I don't agree that
> the gc should warn on a perfectly normal and correct operation.
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc