[sgen] Fix MS block size calculation.
commit7be144c0b716d6098c56a0917bf5b556b7fa2dc7
authorVlad Brezae <brezaevlad@gmail.com>
Wed, 21 Jun 2017 20:08:07 +0000 (21 23:08 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Fri, 23 Jun 2017 20:10:38 +0000 (23 23:10 +0300)
treea9a99ff408219f1c95fd1e64a563f015050d1a7e
parent71936252fe345c06f28a17a073def080b3c7923f
[sgen] Fix MS block size calculation.

The block size must be a multiple of the system page size. Page size simply
cannot be determined reliably at compile time, so we must obtain the page size
through a system call on startup and use it as the block size. We still enforce
a minimum block size of 16kb on systems where the page size is smaller than
that.

The old code hardcoded page sizes for certain architectures with large pages.
THe problem is that those architectures don't necessarily have to have large
pages and on systems where this wasn't the case, we'd end up with a block size
much larger than needed.

Rebase of @alexrp's work.
mono/sgen/sgen-archdep.h
mono/sgen/sgen-marksweep.c