[sgen] Extract the handle array code for reuse
authorVlad Brezae <brezaevlad@gmail.com>
Fri, 22 Jan 2016 00:08:06 +0000 (02:08 +0200)
committerVlad Brezae <brezaevlad@gmail.com>
Fri, 25 Mar 2016 00:12:56 +0000 (02:12 +0200)
commit33beedda93f8da968df431e0f17ebe99d8d65fb2
tree214fdc5401158ca2b4d0dc3181f58f67b2e3a175
parent32ec26d7f48ecf417b9076c0105970c96588b905
[sgen] Extract the handle array code for reuse

We add a new data structure which contains a bucket of entries, exponentially increasing in sizes. The structure is customizable through a few callbacks.

Setting is_slot_set_func enables us to also lookup empty slots, instead of only adding entries at the end of the list.

Setting set_slot_func enables the use of a customized function for setting the slot. If this function is not set, the slots and array fields will be set directly, therefore the structure won't be thread safe.
mono/sgen/Makefile.am
mono/sgen/sgen-array-list.c [new file with mode: 0644]
mono/sgen/sgen-array-list.h [new file with mode: 0644]
mono/sgen/sgen-gchandles.c
msvc/libmonoruntime.vcxproj