Handle OOM and finalizable objects.
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 20 Mar 2012 20:17:46 +0000 (17:17 -0300)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 20 Mar 2012 20:17:46 +0000 (17:17 -0300)
commit8d77ddd99b0990881686cb2be7b330bc25a5d363
tree687e5d3f0c11b7708335e6371905d5f27e6cc36e
parentbd82fc80a800191b51c71d8bb1521a22278951d9
Handle OOM and finalizable objects.

* sgen-gc.c: If we OOM when promoting a nursery object that
is fin ready we end up with it in the fin ready list.

Then, on the next nursery collection, if we don't scan such
list we end up corrupting the heap.

To handle it we scan the fin ready lists on each nursery
collection. This helps us be future proof when finalizing
objects while they are in the nursery becomes common.
mono/metadata/sgen-gc.c