# Language Mechanics On Memory Profiling

DevFeed: [Language Mechanics On Memory Profiling](<https://devfeed.tech/articles/language-mechanics-on-memory-profiling-22128.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2017/06/language-mechanics-on-memory-profiling.html>)

Published: 2017-06-01T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [benchmarking](<https://devfeed.tech/topics/benchmarking.md>), [Code](<https://devfeed.tech/topics/code.md>), [debug](<https://devfeed.tech/topics/debug.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [benchmarking](<https://devfeed.tech/tags/benchmarking.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [memory](<https://devfeed.tech/tags/memory.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

A tutorial on memory profiling in Go that examines heap allocations and escape analysis. It uses a benchmark and memory profiling to identify allocation behavior in a function that processes a stream of bytes and replaces a string with its capitalized form.

## Source excerpt

Prelude This is the third post in a four part series that will provide an understanding of the mechanics and design behind pointers, stacks, heaps, escape analysis and value/pointer semantics in Go. This post focuses on heaps and escape analysis. Index of the four part series: Language Mechanics On Stacks And Pointers Language Mechanics On Escape Analysis Language Mechanics On Memory Profiling Design Philosophy On Data And Semantics Watch this video to see a live demo of this code: GopherCon Singapore (2017) - Escape Analysis