[sgen] Fix MS block size calculation.
authorVlad Brezae <brezaevlad@gmail.com>
Wed, 21 Jun 2017 20:08:07 +0000 (23:08 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Thu, 22 Jun 2017 22:06:49 +0000 (01:06 +0300)
commitabd1bd5d8f633cfdc43570433ed416145e887250
treed77f8f16bd8186e8dd6f6029e7066e04879a4e3b
parente40724e1694c403b3f102d7a6df8f7ce9fc7114f
[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