Skip to content
gqlxj1987's Blog
Go back

Debugging simple memory leak in go

Edit page

原文链接

What is a memory leak?

If memory grows unbounded and never reaches a steady state then there is probably a leak. The key here is that memory grows without ever reaching a steady state, and eventually causes problems through explicit crashes or by impacting system performance.

Memory leaks can happen for any number of reasons. There can be logical leaks where data-structures grow unbounded, leaks from complexities of poor object reference handling, or just for any number of other reasons. Regardless of the source, many memory leaks elicit a visually noticeable pattern: the “sawtooth”.

The goal of our analysis is to progressively narrow scope of the problem by whittling away possibilities until we have enough information to form and propose a hypothesis.

Just to reiterate we’ll try to:

按照上述的步骤去分析

传统方式,还是pprof的方式


Edit page
Share this post on:

Previous Post
Ray
Next Post
Kubernetes Running background task