Skip to content

Add box to VGA palette array#828

Merged
vinc merged 2 commits intotrunkfrom
fix/vga-palette
Apr 6, 2026
Merged

Add box to VGA palette array#828
vinc merged 2 commits intotrunkfrom
fix/vga-palette

Conversation

@vinc
Copy link
Copy Markdown
Owner

@vinc vinc commented Apr 6, 2026

This PR fixes the following issue:

warning: large size difference between variants
   --> src/sys/fs/mod.rs:130:1
    |
130 | / pub enum Resource {
131 | |     Dir(Dir),
    | |     -------- the second-largest variant contains at least 48 bytes
132 | |     File(File),
133 | |     Device(Device),
    | |     -------------- the largest variant contains at least 776 bytes
134 | | }
    | |_^ the entire enum is at least 776 bytes
    |
help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
   --> src/sys/fs/mod.rs:133:5
    |
133 |     Device(Device),
    |     ^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant

@vinc
Copy link
Copy Markdown
Owner Author

vinc commented Apr 6, 2026

The only limitation is that we can't set the palette during driver initialization as it's done before alloc is available.

@vinc
Copy link
Copy Markdown
Owner Author

vinc commented Apr 6, 2026

We can now set the size of the in memory filesystem back to 1/2 of the RAM instead of 1/3 when running the tests and keep adding more device files. See #822 and probably #781 too.

@vinc vinc marked this pull request as ready for review April 6, 2026 21:33
@vinc vinc merged commit 03c415b into trunk Apr 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant