# 设置注册表项以允许大页内存分配
$registryPath = "HKLM:\System\CurrentControlSet\Control\Session Manager\Memory Management"
$valueName = "LargeSystemCache"
# 设置LargeSystemCache值为1来启用大页内存
Set-ItemProperty -Path $registryPath -Name $valueName -Value 1 -Type DWORD
# 重启电脑以应用更改
Restart-Computer -Force