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
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
48
Delay the AI Overlords: How OAuth and OpenFGA Can Keep Your AI Agents from Going Rogue
deepu105
0
64
Auth for MCP: Secure MCP servers using OAuth
deepu105
0
66
Auth0 for AI Agents
deepu105
1
110
Securing the Future of AI: Authorization Strategies for RAG Systems using LangChain4J and OpenFGA
deepu105
0
130
Demystifying OAuth and OIDC: JFokus
deepu105
1
190
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
200
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
270
Docker and Python
trallard
47
3.9k
Statistics for Hackers
jakevdp
799
230k
30 Presentation Tips
portentint
PRO
1
320
Typedesign – Prime Four
hannesfritz
42
3.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
So, you think you're a good person
axbom
PRO
2
2.1k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
470
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
4 Signs Your Business is Dying
shpigford
187
22k
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