Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Go memory allocation
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Deepu K Sasidharan
February 14, 2020
1.9k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Go memory allocation
Deepu K Sasidharan
February 14, 2020
More Decks by Deepu K Sasidharan
See All by Deepu K Sasidharan
Delay the AI Overlords: How OAuth and OpenFGA Can Keep Your AI Agents from Going Rogue
deepu105
0
50
Delay the AI Overlords: How OAuth and OpenFGA Can Keep Your AI Agents from Going Rogue
deepu105
0
72
Auth for MCP: Secure MCP servers using OAuth
deepu105
0
70
Auth0 for AI Agents
deepu105
1
120
Securing the Future of AI: Authorization Strategies for RAG Systems using LangChain4J and OpenFGA
deepu105
0
140
Demystifying OAuth and OIDC: JFokus
deepu105
1
200
Mastering Kubernetes Security from Containers to Cluster Fortresses
deepu105
1
120
Go containerless on Kubernetes
deepu105
1
160
A Passwordless Future! Passkeys for Java Developers
deepu105
0
210
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Embracing the Ebb and Flow
colly
88
5.1k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
250
The Curse of the Amulet
leimatthew05
2
13k
How STYLIGHT went responsive
nonsquared
100
6.2k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
740
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
380
A better future with KSS
kneath
240
18k
Agile that works and the tools we love
rasmusluckow
331
22k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Transcript
Process Virtual Memory Resident set mheap P1(Logical Processor/Hardware Thread) Goroutine
1 stack arena arena ... mcentral mcentral mcentral .. mcache mspan 8b mspan 16b mspan 32b mspan .. mspan .. mspan .. mspan .. mspan .. mspan 32768b mspan 8b (non empty) mspan 8b (empty) mspan 16b mspan 16b mspan mspan P2 G6 stack mcache .. .. .. .. Pn Gn stack mcache mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b
mspan mspan 8b 8b 8b 8b …. 8b 8b 8b
1024 objects mspan 16b 16b 16b 16b …. 16b 16b 16b 512 objects mspan 32b 32b 32b 32b …. 32b 32b 32b 256 objects mspan 48b 48b 48b 48b …. 48b 48b 48b 170 objects mspan 32768 bytes 1 object mspan .. .. .. .. …. .. .. .. ...
Go Scheduler P M G Processor Core G G P
= Logical Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) LRQ = Local Run Queue LRQ
Tiny allocation
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b 4b
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b 4b
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b 4b 10b
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b 4b 10b
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b 4b 10b
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b 4b 10b 12b
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b 4b 10b 12b No free mspan 16b
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b 4b 10b 12b
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b 4b 10b 12b
Tiny allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 16b (non empty) mspan 16b (empty) mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 16b mspan 8b mspan 16b mspan 16b Tiny allocation slot 12b 4b 10b 12b
Small allocation
Small allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 32b (non empty) mspan 32b (empty) mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b mspan 8b mspan 16b mspan 32b Tiny allocation slot 12b
Small allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 8b mspan 16b mspan 32b Tiny allocation slot 12b 20b mspan 32b (non empty) mspan 32b (empty) mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b
Small allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 8b mspan 16b mspan 32b Tiny allocation slot 12b 20b mspan 32b (non empty) mspan 32b (empty) mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b
Small allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 8b mspan 16b mspan 32b Tiny allocation slot 12b 20b 32b No free mspan 32b mspan 32b (non empty) mspan 32b (empty) mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b
Small allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 8b mspan 16b mspan 32b Tiny allocation slot 12b 20b 32b No free mspan 32b mspan 32b (non empty) mspan 32b (empty) mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b
Small allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 8b mspan 16b mspan 32b Tiny allocation slot 12b 20b 32b mspan 32b (non empty) mspan 32b (empty) mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b
Small allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 8b mspan 16b mspan 32b Tiny allocation slot 12b 20b mspan 32b (non empty) mspan 32b (empty) mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b mspan 32b 32b
Large allocation
Large allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 8b mspan 16b mspan 32b Tiny allocation slot 12b 20b mspan 32b 32b
Large allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 8b mspan 16b mspan 32b Tiny allocation slot 12b 20b mspan 32b 32b 40Kb
Large allocation P1 M G2 Processor Core P = Logical
Processor per Hardware Thread M = Machine per OS Thread G = Goroutine (Coroutine) mcache mheap arena mcentral mspan 8b (non empty) mspan 8b (empty) mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mspan 8b mcentral mspan 8b mspan 16b mspan 32b Tiny allocation slot 12b 20b mspan 32b 32b mspan 40Kb