[Gc] Silently fails to allocate memory?
bruce at hoult.org
Sun Apr 14 13:42:52 PDT 2013
On Sun, Apr 14, 2013 at 8:30 PM, The Devils Jester <
thedevilsjester at gmail.com> wrote:
> I made a few observations that allowed me to (I hope) fix the problem. I
> did a blanket "make everything use libgc, even things that have no need for
> gc" change, so its hard to narrow it down, but some values were being
> stomped on (or deleted) when libgc was in play. It seems to work now and
> at this point and I am considering it a win.
That's what GC does. It looks for pointers to your objects and if it can't
find any then it stomps on the object and gives it to you next time you ask
for a new object of that size.
If the only pointer(s) to your objects are in memory that the GC didn't
allocate (such as the internal storage in an STL vector) then the GC won't
see those pointers and will reuse and stomp on your objects.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gc