KeinNiemand / LargePageInjectorMods

MIT License
24 stars 1 forks source link

How do you set the environment variable? #4

Closed Question2 closed 8 months ago

Question2 commented 8 months ago
  1. Set Environment Variable Set the MIMALLOC_RESERVE_HUGE_OS_PAGES environment variable to 2 or higher. This value represents the GB of Large Pages to reserve, ideally more than the RAM typically used by Stellaris.

Where exactly do you set this? Also, is there an easy way to double check if i have large pages enabled successfully? When i went to "lock pages in memory" on win10, my user account was already listed there by default.

Edit : I do get the beep when starting Stellaris. Is there any way to disable the beep now?

KeinNiemand commented 8 months ago

To set environment, type environment into the windows search bar and and there should be an option to open the menu where you can set it, setting it as a user environment variable should be good enough. You could also use Google or ChagtGPT if you need more help with that step.

You can use RamMap to see if large pages are enabled. RamMap has a row called LargePage when you open it, if that row shows any amount of ram other then 0 Large Pages is working. Make sure to start RamMap after the game or manually refresh it once the game is running by pressing F5 or clicking on refresh in the file menue, since it dosn't auto update.

Question2 commented 8 months ago

Thanks, i set MIMALLOC_RESERVE_HUGE_OS_PAGES to 4 in system properties -> environment variables. I had to create a new variable though.

OK, so i started Stellaris, and tried pressing f5 to manually refresh RAM Map :

image

But large page is blank. That means large pages arent enabled? But in "Lock pages in memory", my user account is there by default. Is there something else i need to do?

Edit : Im going to try adding a couple more accounts there just in case.

Edit 2 : I added the administrator account and RAM Map shows a value next to Large Pages, odd because i was not on the "Administrator" account, i was on a different named account...