Преглед изворни кода

Sample memory in smaller chunks when using memory profiling

Ask Bjørn Hansen пре 12 година
родитељ
комит
1a19e7af18
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      geodns.go

+ 4 - 0
geodns.go

@@ -62,6 +62,10 @@ func init() {
 		VERSION = VERSION + "/" + gitVersion
 	}
 
+	if *memprofile != "" {
+		runtime.MemProfileRate = 1024
+	}
+
 	log.SetPrefix("geodns ")
 	log.SetFlags(log.Lmicroseconds | log.Lshortfile)
 }