[sgen] Staging of finalizer registrations.
authorMark Probst <mark.probst@gmail.com>
Tue, 10 May 2011 20:57:15 +0000 (22:57 +0200)
committerMark Probst <mark.probst@gmail.com>
Thu, 12 May 2011 21:50:25 +0000 (23:50 +0200)
commit57d63b413f76498312a37d3e0a729d03d1ebeb2c
tree8bfdddf3f8ce6e48cf16cd77f8497170d205acd3
parenta85de60ee3687ae7c810a41c8fbb5a5d713c87eb
[sgen] Staging of finalizer registrations.

Registering a finalizer required the GC lock to be taken.  To remove
this need we introduce an array where finalizer registrations are
staged in a lock-free way.  Only when the array (currently holding
1024 elements) is full is the GC lock taken and the finalizers are
inserted into the hash.  Of course this also needs to happen when a
collection starts and when a domain is unloaded.
mono/metadata/sgen-fin-weak-hash.c
mono/metadata/sgen-gc.c