Don't use dynamic page size

This mostly reverts 08050dd5e3 (#54)
because the page size of the host is not necessarily the same as the
page size of the binary. For a proper fix, we'll need some way to
determine the page size of the binary, but ELF doesn't readily provide
this information.

Fixes #69.
This commit is contained in:
Eelco Dolstra
2016-01-08 16:12:01 +01:00
parent 1d0ab307db
commit dd299dc2a7

View File

@@ -40,9 +40,10 @@ unsigned char * contents = 0;
static unsigned int getPageSize(){
#if (defined HAVE_SYSCONF)
// if present, use sysconf to get kernel page size
return sysconf(_SC_PAGESIZE);
#ifdef MIPSEL
/* The lemote fuloong 2f kernel defconfig sets a page size of
16KB. */
return 4096 * 4;
#else
return 4096;
#endif