Tagged articles
15 articles
Page 1 of 1
Deepin Linux
Deepin Linux
Jan 28, 2026 · Fundamentals

Unlock Linux Performance: Master Memory Alignment and Struct Optimization

This article explains the core principles of memory alignment on Linux, shows how misaligned data harms CPU cache and execution speed, provides concrete C code examples and benchmark results, and offers practical techniques—including compiler directives and struct layout tricks—to achieve optimal performance.

C programmingLinuxPerformance Optimization
0 likes · 22 min read
Unlock Linux Performance: Master Memory Alignment and Struct Optimization
Liangxu Linux
Liangxu Linux
Nov 24, 2025 · Fundamentals

Understanding Struct Alignment and Over‑Aligned Types in C/C++

This article explains the natural alignment requirements of C/C++ data types, how structs are padded and aligned based on member alignments, the hardware, cache and compiler reasons for alignment, and the concept of over‑aligned types with practical examples and usage guidelines.

CC++compiler
0 likes · 11 min read
Understanding Struct Alignment and Over‑Aligned Types in C/C++
Deepin Linux
Deepin Linux
Oct 9, 2025 · Fundamentals

Why Memory Alignment Is Critical for Linux Performance and Stability

This article explains how memory alignment in Linux—driven by hardware granularity, kernel allocation policies, and compiler optimizations—affects struct layout, cross‑platform compatibility, and execution speed, and provides practical techniques and testing methods to ensure optimal performance and reliability.

C programmingLinuxPerformance Optimization
0 likes · 37 min read
Why Memory Alignment Is Critical for Linux Performance and Stability
Deepin Linux
Deepin Linux
Aug 20, 2025 · Fundamentals

Why Memory Alignment Matters in Linux: Boost Performance and Prevent Bugs

This article explains the concept of memory alignment in Linux, how alignment rules affect struct layout and CPU access, why proper alignment improves performance and portability, and provides practical compiler directives and code examples for implementing and testing aligned data structures.

C programmingPerformance OptimizationStruct Layout
0 likes · 27 min read
Why Memory Alignment Matters in Linux: Boost Performance and Prevent Bugs
Radish, Keep Going!
Radish, Keep Going!
Jan 20, 2025 · Fundamentals

Why Memory Alignment Matters in Go: Performance, Pitfalls, and Tools

This article explains Go's memory alignment concepts, why alignment is needed, demonstrates real-world layout differences with examples, discusses performance and portability impacts, and introduces tools like fieldalignment and structlayout to detect and fix alignment issues in Go programs.

Toolingmemory alignmentstruct
0 likes · 14 min read
Why Memory Alignment Matters in Go: Performance, Pitfalls, and Tools
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.

ASLRCInheritance
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++STLVTable
0 likes · 12 min read
C++ Interview Questions: Polymorphism, Vtables, Memory Alignment, STL Containers, and Multithreading Locks
Liangxu Linux
Liangxu Linux
Oct 15, 2023 · Fundamentals

Mastering C Structs: Definitions, Alignment, and Practical Usage

This guide explains C structs—from basic definitions and declaration styles to memory alignment, byte sizing, bit‑field handling, nested structures, and using structs as function parameters—providing clear code examples and practical tips for efficient embedded and systems programming.

CInitializationbit-fields
0 likes · 29 min read
Mastering C Structs: Definitions, Alignment, and Practical Usage
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.

GoGoroutineLoop 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.

BackendC languagePHP
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‑CRuntimeiOS
0 likes · 22 min read
Understanding Objective‑C Object Memory Layout and Alignment