pprof actual combat - memory leak

scene Multiple services are running in one server. After running for a period of time (less than one day), it is found that a process occupies more than 50% of memory resources, resulting in server exceptions Solution First, start pprof performance analysis in the code runtime.SetBlockProfileRate(1) go func() { log.Println(http.ListenAnd ...

Added by shaoen01 on Wed, 23 Feb 2022 10:21:02 +0200

Memory management A4

First of all, blog writing should be done at one go. Don't trust two or three days. The problems of the day should be solved and absorbed on the same day. Then be patient. You have to be patient in your study. Refer to this link for some content in this article: c + + memory management (super long, detailed examples, good layout)_ Caogenwangbo ...

Added by pootergeist on Sat, 15 Jan 2022 01:51:43 +0200

Summary of 8 cases of memory leakage in java

Summary of 8 cases of memory leakage in java Since the java JVM introduces the garbage collection mechanism, the garbage collector will automatically collect objects that are no longer used. Those who understand the JVM collection mechanism know that the JVM uses the reference counting method and reachability analysis algorithm to judge whethe ...

Added by Joseph Sliker on Wed, 22 Dec 2021 01:42:10 +0200

Memory leak! Do you really understand the reason for overriding the equals() and hashcode() methods?

Basic conceptsTo compare whether two objects are equal, you need to call the equals() method of the object:Judge whether the object addresses pointed to by the object reference are equalWhen the object addresses are equal, the data related to the object is also equal, including:object handle Object headerObject instance dataObject type dataYou ...

Added by eletrium on Wed, 15 Dec 2021 16:14:34 +0200