📌 Memory Allocation in Go
❌این پست اپدیت میشود ❌
🔹 در این پست به بررسی جزئیات مدیریت حافظه در زبان Go میپردازیم.
درک درست از ساختار حافظه به شما کمک میکند عملکرد برنامههایتان را بهتر بهینه کنید و رفتار Garbage Collector را بهتر بفهمید.
🔵 Introduction
🔴 https://t.me/gopher_academy/4231
➖➖➖➖➖➖➖➖
🔵 Go’s View of Virtual Memory
🔴 https://t.me/gopher_academy/4232
➖➖➖➖➖➖➖➖
🔵 Arena and Page
🔴 https://t.me/gopher_academy/4233
➖➖➖➖➖➖➖➖
🔵 Span and Size Class
🔴https://t.me/gopher_academy/4260
🟡Two spans with different size classes
🟢https://t.me/gopher_academy/4261
🟡Tail waste in span
🟢https://t.me/gopher_academy/4262
🟡User objects and size class objects
🟢https://t.me/gopher_academy/4263
➖➖➖➖➖➖➖➖
🔵Span Class
🔴 https://t.me/gopher_academy/4283
➖➖➖➖➖➖➖➖
🔵Span Set
🔴https://t.me/gopher_academy/4284
➖➖➖➖➖➖➖➖
🔵 Heap Bits and Malloc Header
🔴https://t.me/gopher_academy/4285
🟡Heap bits in a span
🟢https://t.me/gopher_academy/4286
🟡Malloc header in objects
🟢https://t.me/gopher_academy/4287
➖➖➖➖➖➖➖➖
🔵 Heap Management
🔴https://t.me/gopher_academy/4304
➖➖➖➖➖➖➖➖
🔵 Span Allocation: mheap.alloc
🔴https://t.me/gopher_academy/4305
➖➖➖➖➖➖➖➖
🔵 Tracking Free Pages
🔴 https://t.me/gopher_academy/4306
➖➖➖➖➖➖➖➖
🔵 Visualization of a bitmap summary
🔴https://t.me/gopher_academy/4307
➖➖➖➖➖➖➖➖
🔵 Merging summaries of two contiguous memory chunks
🔴 https://t.me/gopher_academy/4416
➖➖➖➖➖➖➖➖
🔵 Radix tree of summaries for the entire address space
🔴https://t.me/gopher_academy/4451
➖➖➖➖➖➖➖➖
🔵 A deeper look into the summary radix tree
🔴https://t.me/gopher_academy/4453
➖➖➖➖➖➖➖➖
🔵 Finding Free Pages: pageAlloc.find
🔴
➖➖➖➖➖➖➖➖
🔵 Growing the Heap: mheap.grow
🔴
➖➖➖➖➖➖➖➖
🔵 Setting up a Span: mheap.haveSpan
🔴
➖➖➖➖➖➖➖➖
🔵 Caching Free Pages: mheap.allocToCache
🔴
➖➖➖➖➖➖➖➖
🔵 Logic for finding free pages for span allocation
🔴
➖➖➖➖➖➖➖➖
🔵 Caching Span Objects: mheap.allocMSpanLocked
🔴
➖➖➖➖➖➖➖➖
🔵Central Span Manager: mcentral
🔴
➖➖➖➖➖➖➖➖
🔵Processor’s Memory Allocator: mcache
🔴
➖➖➖➖➖➖➖➖
🔵 Heap Allocation
🔴
➖➖➖➖➖➖➖➖
🔵Tiny Objects: mallocgcTiny
🔴
➖➖➖➖➖➖➖➖
🔵 Small Objects: mallocgcSmall*
🔴
➖➖➖➖➖➖➖➖
🔵 Large Objects: mallocgcLarge
🔴
➖➖➖➖➖➖➖➖
🔵Stack Management
🔴
➖➖➖➖➖➖➖➖
🔵Allocating Stack: stackalloc
🔴
➖➖➖➖➖➖➖➖
🔵 Stack Growth: morestack
🔴
➖➖➖➖➖➖➖➖
🔵Reusing Stack: stackfree
🔴
➖➖➖➖➖➖➖➖
🔵 Stack or Heap?
🔴
➖➖➖➖➖➖➖➖
🔵 Case Studies
🔴
➖➖➖➖➖➖➖➖
👑 @gopher_academy
Post #41388
16
Forwarded from Gopher Academy
Telegram Gopher Academy 🔹 Introduction – Memory Allocation in Go مدیریت حافظه بخش حیاتی هر زبان برنامهنویسی است و Go هم از این قاعده مستثنی نیست. سرعت و کارایی برنامههای Go به شدت وابسته به نحوه تخصیص و مدیریت حافظه است. هرچند Go با APIهای سادهای مثل new(T), &T{} و make پیچیدگیها…