Change the size of my memory pages?

The PAGESIZE is set at kernel compile time. That selection is only valid for i386 hardware. If you run a 64-bit system or any other architecture, the page size is 4K and cannot be changed.


You probably want to look at Transparent Hugepages. The .config item is CONFIG_TRANSPARENT_HUGEPAGE. Note that enabling this won't give you huge pages automatically. You'll need to set the CONFIG_TRANSPARENT_HUGEPAGE_MADVISE to 'n', in order to make it the default.

Also note that this doesn't allow you to choose an arbitrary page size. I allows to use the huge page size of the architecture. For x86_64 this is 1Mb, see https://en.wikipedia.org/wiki/Page_(computer_memory)#Huge_pages for the full table.