[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)
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.


No differences found