[sgen] Fix internal allocation
authorVlad Brezae <brezaevlad@gmail.com>
Mon, 26 Sep 2016 17:04:51 +0000 (20:04 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Mon, 26 Sep 2016 21:38:41 +0000 (00:38 +0300)
commit837d12bfc6b5a2d7575e3ed16dfd735358ba8813
tree5fc77ef58e2a3dd028c7994de020ec5a77bba637
parentf66549c12d0fb9cc09a47e5ad17e249ca56da734
[sgen] Fix internal allocation

After recent header size change in 883e0a2d899a6a19db2c1d5222d45b8423ce36a2, we had some slot sizes unaligned which was leading to unaligned memory allocation and therefore SIGBUS-es on some ARMs.

We used to have all allocators use 16k blocks and slot sizes optimized for this. After we switched to allocating in 4k, 8k and 16k blocks the slot sizes were not optimized for the new format.

This commit fixes unaligned problems, at the same time optimizing the size of allocator slots.
mono/sgen/sgen-internal.c