How can I limit the memory & cpu usage of Alloy on windows server

How can I limit the memory & cpu usage of Alloy on windows server
I would like to deploy grafana alloy on a lot of windows 2019 servers and I want to set it up to no more than using 1GB ram and 1 cpu.

Is it as simple as editing the registry
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Alloy

and add -Xmx10m in ImagePath (e.g. 10mb here)

ImagePath
“C:\Program Files\GrafanaLabs\Alloy\alloy-service-windows-amd64.exe” -Xmx10m

that’s just the service calling a different app at the end.

level=info msg=“starting program” command=“C:\Program Files\GrafanaLabs\Alloy\alloy-windows-amd64.exe run C:\Program Files\GrafanaLabs\Alloy\config.alloy --storage.path=C:\ProgramData\GrafanaLabs\Alloy\data”

So if I run it manually with Xmx10m , it doesn’t work either (of course)