[Gc] Silently fails to allocate memory?
The Devils Jester
thedevilsjester at gmail.com
Fri Apr 12 14:51:53 PDT 2013
It is difficult to describe the issue I am having with libgc.
I have a for loop that allocates thousands of (small) objects. Each
iteration of the loop only allocates a few new objects, but when the loop
is sufficiently large (usually around 3500 iterations), then for some
reason it just...well gives up. It does not hang or segfault, or give any
indication that something is wrong, but it (and this is difficult to
determine) seems to silently stop allowing the objects to be created.
If I disable libgc (or manually call delete, which is not a working long
term solution), the loop executes correctly. This is on Ubuntu Linux using
GCC 4.7 .
On Mac OS X, I cannot tell if its working (which it appears to be) or if
the limit to "give up" is might higher.
Is there some trick to this? Am I using it wrong? How I am using libgc is
by simply including "gc_cpp.h" calling "GC_INIT" and having my class(es)
inherit from gc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gc