mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
fix(memory): reclaim idle session memory under pressure (#2382)
This commit is contained in:
1 parent
da5a36151b
commit
a8237e8927
7 files changed
+379
-82
No files matched your search
@@ -77,6 +77,7 @@ object SessionArtifacts {
|
||||
copySteamLogs(context, dir, record, steamArch)
|
||||
VacDiagnostics.collect(context, dir)
|
||||
SessionLogCapture.dumpCrashBuffer(File(dir, "crash.log"))
|
||||
SessionLogCapture.dumpMemoryPressure(File(dir, "memory-pressure.log"))
|
||||
val scrubbed = markScrubbed(scrubTree(record))
|
||||
SessionEvents.record("session.artifacts_collected", mapOf("reason" to reason), dir)
|
||||
if (scrubbed) File(dir, COMPLETE_MARKER).writeText("collected: $reason at ${now()}\n")
|
||||
@@ -594,6 +595,10 @@ object SessionArtifacts {
|
||||
if (!crashLog.exists()) {
|
||||
SessionLogCapture.dumpCrashBuffer(crashLog)
|
||||
}
|
||||
val memoryLog = File(dir, "memory-pressure.log")
|
||||
if (newest && !memoryLog.exists()) {
|
||||
SessionLogCapture.dumpMemoryPressure(memoryLog)
|
||||
}
|
||||
if (stopWhenSessionStarts && SessionState.running) {
|
||||
record.failed = true
|
||||
record.deferred = true
|
||||
|
||||
Reference in new issue
Block a user