[sgen] Fix block size computation for allocation size
authorVlad Brezae <brezaevlad@gmail.com>
Tue, 4 Oct 2016 11:47:51 +0000 (14:47 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Tue, 4 Oct 2016 15:18:49 +0000 (18:18 +0300)
commit5a13c41a368cdfdfb050f0fc32de1b8dc4a845a5
treed26646b92d7e607114ed4a94e481f543f5e96990
parent43f369a1073652cb211aea5bff28743ab7879f47
[sgen] Fix block size computation for allocation size

The block size for a slot size is the minimum block size that can fit two slots. Make sure the computation accounts for the fact that even though a slot size might fit twice in the block, it still has to be allocated at aligned addresses, so it can end up using a higher block size.

Fixes 44922.
mono/sgen/sgen-internal.c