TGViewer
Dev Perfects Dev Perfects @dev_perfects · 39 subscribers
Post #41388 16

Forwarded from Gopher Academy

📌 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
Telegram Gopher Academy 🔹 Introduction – Memory Allocation in Go مدیریت حافظه بخش حیاتی هر زبان برنامه‌نویسی است و Go هم از این قاعده مستثنی نیست. سرعت و کارایی برنامه‌های Go به شدت وابسته به نحوه تخصیص و مدیریت حافظه است. هرچند Go با APIهای ساده‌ای مثل new(T), &T{} و make پیچیدگی‌ها…
More from @dev_perfects
  1. Nov 19, 2025در یک حرکت اشتباه متاسفانه زدم سرور رو پاک کردم🫤 در روز های آتی دوباره فروارد ها از سر گر…
  2. Nov 19, 2025Separate your Cloudflare page cache with a middleware group https://t.me/iv?url=https://la…
  3. Nov 19, 2025🔶 از سر بیکاری فریم ورک CSS ساختم 🚬 @TheRaymondDev
  4. Nov 19, 2025video post
  5. Nov 19, 2025از بعد از جنگ از ۲ تا از دوستان فعال در حوزه اینترنت آزاد بی‌خبر موندم و حقیقتش نگران وضعی…
  6. Nov 19, 2025تمپلیت r1ec honojs رو یسری تغییرات بهش دادم که خیلی تجربتون بهتر شه: - سیستم بیلد جدید با…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →