Tag

memory alignment

0 views collected around this technical thread.

Tencent Architect
Tencent Architect
May 14, 2024 · Fundamentals

Unlocking C++ Object Memory Layout: From Basics to Inheritance and ASLR

This article walks through C++ object memory layout using concrete examples, covering basic data members, methods, private and static members, inheritance (with and without virtual functions), compiler optimizations, and address‑space layout randomization, all demonstrated with GDB inspections and code snippets.

ASLRC++GDB
0 likes · 22 min read
Unlocking C++ Object Memory Layout: From Basics to Inheritance and ASLR
Deepin Linux
Deepin Linux
Dec 20, 2023 · Fundamentals

C++ Interview Questions: Polymorphism, Vtables, Memory Alignment, STL Containers, and Multithreading Locks

This article presents a comprehensive C++ interview guide covering dynamic polymorphism, vtable mechanics, static vs virtual functions, memory alignment benefits, iterator invalidation in vector and map, erase‑remove idiom, map implementation details, and common synchronization primitives used in multithreaded programming.

C++LocksMultithreading
0 likes · 12 min read
C++ Interview Questions: Polymorphism, Vtables, Memory Alignment, STL Containers, and Multithreading Locks
DeWu Technology
DeWu Technology
Oct 11, 2023 · Fundamentals

Understanding JVM Pointer Compression and Memory Layout

The article explains how the JVM reduces memory consumption on 64‑bit systems by using compressed ordinary object pointers (compressed oops), describes pointer size, alignment and padding, shows C struct and JVM object layout examples, and demonstrates inspection tools like HSDB and XPocket for analyzing object memory footprints.

HSDBJVMJava
0 likes · 12 min read
Understanding JVM Pointer Compression and Memory Layout
360 Tech Engineering
360 Tech Engineering
Aug 3, 2021 · Fundamentals

Common Go Pitfalls: Loop Variable Capture, := Scope, Goroutine Pools, and Struct Memory Alignment

This article examines several subtle Go programming issues—including unexpected loop variable addresses, the scope nuances of the := operator, proper handling of goroutine concurrency with worker pools, and how struct field ordering affects memory alignment—providing code examples and practical solutions to avoid these pitfalls.

ConcurrencyGoLoop Variable
0 likes · 15 min read
Common Go Pitfalls: Loop Variable Capture, := Scope, Goroutine Pools, and Struct Memory Alignment
php中文网 Courses
php中文网 Courses
Jun 29, 2021 · Backend Development

Analyzing PHP Core: Variables and Zend Engine Structures (Part 1)

This article introduces the PHP variable system by examining the Zend Engine's source code, covering variable naming rules, value types, reference and variable variables, file extensions in the PHP source tree, and a detailed walkthrough of the zend_types.h definitions, unions, structs, and memory‑alignment considerations.

C languageVariablesbackend
0 likes · 32 min read
Analyzing PHP Core: Variables and Zend Engine Structures (Part 1)
DataFunTalk
DataFunTalk
Mar 25, 2021 · Artificial Intelligence

Optimizing MNN Mobile Neural Network Inference on GPU with OpenCL: Memory Objects, Work‑Group Tuning, and Auto‑Tuning

This article explains how the MNN deep‑learning framework leverages OpenCL to achieve high‑performance inference on mobile, PC and embedded GPUs by diversifying memory objects, aligning data, using local‑memory reductions, selecting optimal work‑group sizes, applying pre‑inference auto‑tuning, caching compiled programs, and providing practical GPU‑friendly model design guidelines.

GPU optimizationMNNOpenCL
0 likes · 20 min read
Optimizing MNN Mobile Neural Network Inference on GPU with OpenCL: Memory Objects, Work‑Group Tuning, and Auto‑Tuning
Sohu Tech Products
Sohu Tech Products
Dec 18, 2019 · Mobile Development

Understanding Objective‑C Object Memory Layout and Alignment

This article explores how Objective‑C objects are converted to low‑level C/C++ structures, compares the results of class_getInstanceSize, malloc_size and sizeof, and explains memory‑alignment rules, member ordering, padding, and inheritance effects on the actual memory footprint of iOS objects.

Objective-CiOSmemory alignment
0 likes · 22 min read
Understanding Objective‑C Object Memory Layout and Alignment
Refining Core Development Skills
Refining Core Development Skills
Sep 23, 2019 · Fundamentals

Understanding the Physical Structure of Memory and the Root Cause of Memory Alignment

The article explains how memory chips are organized into banks and matrices, why eight consecutive bytes are distributed across eight banks for parallel I/O, and how this hardware design makes 64‑bit (8‑byte) alignment essential for optimal performance.

Computer ArchitectureI/Obanks
0 likes · 5 min read
Understanding the Physical Structure of Memory and the Root Cause of Memory Alignment