Fix page size for aarch64-apple-darwin in test#167
Conversation
lhecker
left a comment
There was a problem hiding this comment.
I don't think this is the right solution. IMO either we should hardcode it to 16Ki (or 64Ki or more) because the test doesn't actually care about the page size, or we should add a function to sys that returns the OS page size.
What do you think?
e.g. aarch64-apple-darwin has 16KiB page size
|
Because the value is only used in test, I selected hard-coding big value. page_size crate is used by many crates for this purpose, but this project seems to keep the dependency as small as possible. |
There are various reasons for this, but as I mentioned elsewhere, I'm trying to keep the editor fast and small. Dependencies don't always compose well. Someone asked for instance why I don't use the For Personally, I also like it because I can learn new tricks this way. What better way is there to grow as an engineer than to challenge oneself? |
|
In this case, page_size can be added to dev-dependency. Then it will be run only in test but never will be deployed to users. |
Page size is not always 4k
Page size is not always 4k
Page size is not always 4k