modrinth / code

The Modrinth monorepo containing all code which powers Modrinth!
https://modrinth.com
Other
875 stars 154 forks source link

Some RAM allocation values can't be selected #1009

Open w26ad opened 7 months ago

w26ad commented 7 months ago

Describe the bug

Some RAM allocation values can't be selected Try to input some random values in the box (or just input any odd number like 2047) You'll see that your RAM allocation value would be set to lower than it should be (like 2047 turns into 1984 🗿) You can also slowly slide the slider and see that only a small amount of RAM values can be selected

https://github.com/modrinth/theseus/assets/65756919/c6548f25-f4b7-4a7a-8455-373642a88d28

Steps to reproduce

  1. Go to Settings
  2. Go to Java Settings -> Java Memory
  3. Try to input some random values in the box
  4. Or just input any odd number (like 2047)
  5. Or slowly slide the slider
  6. You'll see that some RAM allocation values can't be selected

Expected behavior

All RAM allocation values can be selected

System information

Windows 11 23H2 22635.3061 (Beta channel) Theseus v0.6.3

Additional context

No response

tippfehlr commented 7 months ago

I can confirm this, but it seems like expected behavior. I’d guess that some kind of multiple of 2 is wanted for the memory.

Is this really a problem?

ignissak commented 7 months ago

RAM comes in powers of 2 because computer memory and storage chips are made of tiny electronic switches with two possible states, on and off.