Improve power report

This commit is contained in:
世界
2026-08-30 17:41:47 +08:00
parent 3f986d584e
commit c53c2375c4
9 changed files with 155 additions and 34 deletions
+5
View File
@@ -27,6 +27,11 @@ func PowerReportOptions(startedService *daemon.StartedService) powerreport.Optio
LogCallback: func() []byte {
return formatLogEntries(startedService.SavedLog())
},
ProfileCallback: func(path string) {
for _, name := range oomReportProfiles {
writeOOMProfile(path, name)
}
},
}
}
+1 -1
View File
@@ -94,7 +94,7 @@ func ReloadSetupOptions(options *SetupOptions) {
sOOMMemoryLimit = oomkiller.DefaultAppleNetworkExtensionMemoryLimit
}
if sOOMMemoryLimit > 0 {
debug.SetMemoryLimit(sOOMMemoryLimit * 3 / 4)
debug.SetMemoryLimit(sOOMMemoryLimit * 4 / 5)
} else {
debug.SetMemoryLimit(math.MaxInt64)
}