aboutsummaryrefslogtreecommitdiff
path: root/ui/commands.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/commands.go')
-rw-r--r--ui/commands.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/commands.go b/ui/commands.go
index 4dd1482..02d2a3d 100644
--- a/ui/commands.go
+++ b/ui/commands.go
@@ -263,8 +263,10 @@ func cmdRoomNick(cmd *Command) {
}
func cmdHeapProfile(cmd *Command) {
- runtime.GC()
- dbg.FreeOSMemory()
+ if len(cmd.Args) == 0 || cmd.Args[0] != "nogc" {
+ runtime.GC()
+ dbg.FreeOSMemory()
+ }
memProfile, err := os.Create("gomuks.heap.prof")
if err != nil {
debug.Print("Failed to open gomuks.heap.prof:", err)