←back to thread

95 points ingve | 1 comments | | HN request time: 0.368s | source
Show context
mkw5053 ◴[] No.44567439[source]
I used to work closely with the Android team at Unity, and in my experience, shifting large native codebases to a new page size often uncovers subtle runtime assumptions beyond just replacing hardcoded constants like PAGE_SIZE. I’m optimistic Google’s tooling will help a lot, but interested about how effectively it catches these more nuanced compatibility issues like custom allocators or memory pooling tuned for 4K boundaries.
replies(2): >>44568557 #>>44573383 #
HPsquared ◴[] No.44568557[source]
Could they find those by setting page size to some absurdly large value like 1MB?
replies(2): >>44568979 #>>44571706 #
1. alexey-salmin ◴[] No.44571706[source]
Tangent, but 1Mb pages aren't that absurd really. The x86-64 has hardware support for 4k, 2MB, and 1GB page sizes (because each level of the pagemap cuts 9 bits from the virtual address). Luckily it supports all 3 mixed together so normally you just keep most of your data in 4kb pages and use 2Mb/1Gb occasionally. But from my understanding nothings prevents you from forcing 2Mb on all userspace code even though Linux kernel doesn't support it.