move host_page_size to sysdeps#514
Conversation
51d44d4 to
f238015
Compare
acfoltzer
left a comment
There was a problem hiding this comment.
This seems like a good change to me, thank you! This diff reminds me I've been meaning to convert this to a lazy_static, but that doesn't have to be done right now.
@iximeow I know you've been thinking a lot about cross-platform lately. Does leaning on the sysdeps module tree make sense to you too?
iximeow
left a comment
There was a problem hiding this comment.
Does leaning on the
sysdepsmodule tree make sense to you too?
I think so. I wanted to noodle over this because we have several places where a "system-dependent" value, function, ... is actually dependent on both system and architecture. Technically page size is too (x86_64-specific references etc), but we only support x86_64 at the moment, so it doesn't matter much. I was hoping to have some inspiration this weekend in dealing with that particular combinatorial explosion, but in reality it probably won't be too bad and sysdeps with a maybe future archdeps is probably fine.
I hadn't thought about this before in reading this code, but do we blow up on systems with hugepages?
None of these thoughts should block this change though, so ➕ and thank you @froydnj !
|
Thanks for the reviews, everyone!
Yes, the check that we get back |

I have this quixotic idea that most OS/arch-specific stuff should be able to live in
lucet_runtime_internals::sysdeps; this patch is a first step along that path. Ideally, adding Windows support can be boiled down to figuring out how to expose the right interfaces fromsysdepsthat everybody can implement. Signals make this very tricky, among other things, but perhaps since Firefox doesn't care about signals + Lucet, the signal support for Windows can somehow be punted down the road.Happy to hear thoughts about what might be a better path to structuring the codebase for Windows support.