Tagged articles
45 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Dec 23, 2025 · Fundamentals

Why char s1[] and char *s2 Aren’t the Same: Deep Dive into C Arrays vs Pointers

This article explains the fundamental differences between C arrays and pointers by examining memory layout, mutability, sizeof behavior, function parameter handling, multidimensional arrays, and practical best‑practice guidelines, providing clear code examples that reveal why declarations like char s1[] = "liangxu" and char *s2 = "liangxu" behave differently.

CEmbedded Cbest practices
0 likes · 14 min read
Why char s1[] and char *s2 Aren’t the Same: Deep Dive into C Arrays vs Pointers
Linux Kernel Journey
Linux Kernel Journey
Sep 24, 2025 · Fundamentals

Fine-Grained GPU Code Modifications: Boosting CUDA Performance

This article explains why certain GPU performance gains require direct CUDA kernel edits and walks through fine‑grained techniques such as data‑layout restructuring, warp‑level primitives, tiled memory accesses, kernel fusion, and dynamic execution paths, backed by code examples and benchmark insights.

CUDAGPU Optimizationdynamic execution
0 likes · 12 min read
Fine-Grained GPU Code Modifications: Boosting CUDA Performance
Liangxu Linux
Liangxu Linux
May 21, 2025 · Fundamentals

Unlock C Memory Layout: From Stack to Heap Explained with Real Code

This article demystifies C's memory layout by comparing it to a house, detailing each segment—from the stack and heap to global variables and the code section—while providing clear examples, common pitfalls, debugging tips, and interactive challenges to solidify understanding.

Cmemory layoutprogramming fundamentals
0 likes · 15 min read
Unlock C Memory Layout: From Stack to Heap Explained with Real Code
Liangxu Linux
Liangxu Linux
Apr 19, 2025 · Fundamentals

Why Does Your C++ Program’s Memory Look Like This? From Punch Cards to Virtual Memory

This article traces the evolution of memory layout from early punched‑card computers through assembly‑level innovations, segment‑based designs, and virtual memory, then demonstrates a real 32‑bit Linux C++ program showing where globals, stack, heap, and mapped regions reside, and explains how this knowledge helps debug segmentation faults, stack overflows, and memory leaks.

BSSC++Virtual Memory
0 likes · 13 min read
Why Does Your C++ Program’s Memory Look Like This? From Punch Cards to Virtual Memory
ITPUB
ITPUB
Mar 25, 2025 · Fundamentals

What Really Happens When You Double‑Click an App? Inside the OS Loading Process

From double‑clicking an icon to the CPU executing the first instruction, this article walks through how an executable file is identified, loaded into memory, partitioned into code, data, heap and stack sections, and finally launched via the entry‑point address defined in the ELF format.

ELF formatexecutable filesmemory layout
0 likes · 6 min read
What Really Happens When You Double‑Click an App? Inside the OS Loading Process
Raymond Ops
Raymond Ops
Mar 19, 2025 · Fundamentals

Unlocking Go’s Empty Interface: How Any Type Becomes a Value

This article explains Go’s empty interface, showing how it can hold values of any type, how to declare and use it in functions and data structures, and why copying between concrete slices and empty‑interface slices requires element‑wise assignment due to its two‑word memory layout.

GoInterfaceSlice
0 likes · 5 min read
Unlocking Go’s Empty Interface: How Any Type Becomes a Value
IT Services Circle
IT Services Circle
Feb 15, 2025 · Fundamentals

Why Array Indices Start at Zero: History, Memory Layout, and Practical Benefits

Array indexing begins at zero due to historical decisions dating back to early languages like B and C, memory layout efficiencies that avoid extra subtraction, mathematical elegance of half-open intervals, and practical advantages in loops, hashing, multidimensional arrays, and language design, making zero-based indexing the de‑facto standard.

array indexingmemory layoutprogramming fundamentals
0 likes · 8 min read
Why Array Indices Start at Zero: History, Memory Layout, and Practical Benefits
Sohu Tech Products
Sohu Tech Products
Jan 8, 2025 · Mobile Development

Unveiling iOS Blocks: Memory Layout, Types, and Clang Conversion

This article dissects iOS blocks, explaining their struct‑based memory layout, the three block types, how they are transformed into C++ code with clang, and the impact of capturing variables—including value, static, global, and object references—on block behavior and lifecycle.

BlocksCClang
0 likes · 12 min read
Unveiling iOS Blocks: Memory Layout, Types, and Clang Conversion
Java Tech Enthusiast
Java Tech Enthusiast
Oct 11, 2024 · Fundamentals

Understanding How Executable Programs Run and Their Memory Layout

The article explains that an executable file contains machine instructions which the operating system parses (e.g., ELF), loads into RAM by allocating distinct memory regions for code, data, heap, stack and any dynamic libraries, then reads the entry‑point address to set the CPU’s instruction pointer and start execution.

ELFOperating Systemexecutable file
0 likes · 5 min read
Understanding How Executable Programs Run and Their Memory Layout
Liangxu Linux
Liangxu Linux
Sep 16, 2024 · Fundamentals

What Happens When You Double‑Click an App? Inside the OS Loading Process

This article explains how an executable file is identified, loaded into memory, and organized into code, data, heap, and stack segments, describing the OS’s role, ELF format details, dynamic library placement, and how the CPU finds the program’s entry point to start execution.

ELFExecutablememory layout
0 likes · 6 min read
What Happens When You Double‑Click an App? Inside the OS Loading Process
Liangxu Linux
Liangxu Linux
Aug 5, 2024 · Fundamentals

Static vs Dynamic Libraries: Save Disk Space and Simplify Updates

This article explains how programs are laid out in memory, walks through the compilation and linking stages, compares static and dynamic linking, and shows why dynamic libraries reduce disk and memory usage while making bug fixes easier.

CompilationStatic Linkingdynamic linking
0 likes · 8 min read
Static vs Dynamic Libraries: Save Disk Space and Simplify Updates
Liangxu Linux
Liangxu Linux
Jul 28, 2024 · Fundamentals

Why Static Libraries Waste Space and How Dynamic Linking Saves It

This article explains the memory layout of a program, the compilation and linking processes, and compares static and dynamic libraries, highlighting how static linking duplicates code while dynamic linking shares libraries to reduce disk and memory usage.

CompilationDynamic LibraryLinker
0 likes · 7 min read
Why Static Libraries Waste Space and How Dynamic Linking Saves It
Python Programming Learning Circle
Python Programming Learning Circle
Jul 15, 2024 · Fundamentals

Understanding NumPy Array Memory Layout and Accelerating Image Resizing with Unsafe Python Techniques

This article explains how NumPy stride differences caused a 100× slowdown when resizing images from a pygame Surface, demonstrates how to reinterpret the underlying memory layout using ctypes to achieve a 100× speedup with OpenCV, and discusses the safety implications of such low‑level Python tricks.

NumPyOpenCVPython
0 likes · 19 min read
Understanding NumPy Array Memory Layout and Accelerating Image Resizing with Unsafe Python Techniques
IT Services Circle
IT Services Circle
Jun 21, 2024 · Fundamentals

Understanding the Difference Between Static and Dynamic Libraries

This article explains how programs are laid out in memory, the roles of code, data, heap, and stack sections, and compares static linking, which bundles all code into the executable, with dynamic linking, which loads shared libraries at runtime to save disk and memory space.

CompilationStatic Linkingdynamic linking
0 likes · 9 min read
Understanding the Difference Between Static and Dynamic Libraries
Liangxu Linux
Liangxu Linux
Apr 21, 2024 · Fundamentals

Understanding C Memory Layout on STM32: Stack, Heap, and Data Segments Explained

This article explains C language memory partitioning—including stack, heap, global/static, constant, and code sections—illustrates their characteristics and growth directions, then applies the concepts to STM32F103 by showing memory map details and providing a complete Keil‑based C program that prints the addresses of variables in each region.

CData SegmentHeap
0 likes · 10 min read
Understanding C Memory Layout on STM32: Stack, Heap, and Data Segments Explained
Liangxu Linux
Liangxu Linux
Apr 5, 2024 · Fundamentals

Understanding C Memory Layout on STM32: Stack, Heap, and Global Sections

This article explains the C language memory segmentation—including stack, heap, global/static, constant, and code areas—illustrates their behavior on STM32F103 with Keil V5, and provides detailed example code that prints the addresses of variables in each region to demonstrate allocation and lifetime.

CHeapSTM32
0 likes · 9 min read
Understanding C Memory Layout on STM32: Stack, Heap, and Global Sections
Su San Talks Tech
Su San Talks Tech
Aug 23, 2023 · Fundamentals

Why Does JVM Allocate Objects in Multiple Steps? Explore Creation & Memory Layout

This article explains the JVM's object creation process—including stack allocation, TLAB checks, Eden and Survivor spaces, and GC handling—and details the memory layout of Java objects, covering object headers, class pointers, array lengths, padding, and the effect of compressed oops on 32‑bit versus 64‑bit systems.

Garbage CollectionJVMJava
0 likes · 9 min read
Why Does JVM Allocate Objects in Multiple Steps? Explore Creation & Memory Layout
AI Cyberspace
AI Cyberspace
Mar 2, 2023 · Fundamentals

Mastering C Structures: From Declaration to Bit Fields

This article provides a comprehensive guide to C structures, covering declaration, variable definition, typedef aliases, initialization methods, pointer usage, member access, memory layout, nested structs, and bit fields, complete with code examples and visual illustrations to help readers understand and apply these concepts effectively.

Cbit fieldmemory layout
0 likes · 12 min read
Mastering C Structures: From Declaration to Bit Fields
Tencent Cloud Developer
Tencent Cloud Developer
Sep 29, 2022 · Backend Development

Analyzing Go Memory Layout and Object Dumping

The article demonstrates how to examine a running Go program’s memory layout by defining example structs, using unsafe.Sizeof/Alignof, dumping writable regions via a Bash script and GDB, and locating fields and string constants in the resulting memory dumps to verify object representation.

GoHeap InspectionLinux
0 likes · 27 min read
Analyzing Go Memory Layout and Object Dumping
php Courses
php Courses
May 27, 2022 · Backend Development

Understanding the PHP zval Structure in the Source Code

This article examines how PHP stores variables internally by analyzing the zval structure defined in the C source code, detailing its fields, type flags, memory layout, and associated macros, and explains why each variable occupies 16 bytes at runtime.

BackendCinternals
0 likes · 8 min read
Understanding the PHP zval Structure in the Source Code
Architect's Tech Stack
Architect's Tech Stack
Jun 5, 2021 · Fundamentals

Understanding Java Object Memory Layout and the Size of new Object()

This article explains how Java objects are stored in memory, analyzes the heap layout, object header, instance data, and padding, demonstrates the byte size of a new Object() with and without compressed OOPs, and discusses object access methods and garbage‑collection regions.

Object Sizecompressed-oopsgarbage-collection
0 likes · 12 min read
Understanding Java Object Memory Layout and the Size of new Object()
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Aug 28, 2020 · Information Security

Position Independent Code (PIC), Position Independent Executable (PIE), and Address Space Layout Randomization (ASLR) in Linux

The article explains how Position Independent Code (PIC) enables code to run at any address using GOT and PLT tricks, how Position Independent Executables (PIE) extend this to whole binaries, and how Linux’s Address Space Layout Randomization (ASLR) leverages PIE to fully randomize process memory, making exploitation significantly harder.

ASLRLinuxPIC
0 likes · 13 min read
Position Independent Code (PIC), Position Independent Executable (PIE), and Address Space Layout Randomization (ASLR) in Linux
Sohu Tech Products
Sohu Tech Products
Aug 5, 2020 · Fundamentals

Exploring Swift Enum Implementation: SIL, Memory Layout, Raw Values, Associated Values, and Protocols

This article delves into the inner workings of Swift enums—covering their compilation to SIL, memory representation, use of MemoryLayout for size and alignment, techniques for retrieving variable addresses, the role of raw values and associated values, and how default protocols like Equatable and Hashable are automatically provided.

Associated ValueRawValueSIL
0 likes · 19 min read
Exploring Swift Enum Implementation: SIL, Memory Layout, Raw Values, Associated Values, and Protocols
Architect's Tech Stack
Architect's Tech Stack
Jun 24, 2020 · Fundamentals

How Java Objects Are Created and Managed in the JVM

This article explains the JVM's process for creating Java objects, covering class loading checks, memory allocation strategies such as bump‑the‑pointer and free‑list, object header composition, instance data layout, alignment padding, and the ways references locate objects via handles or direct pointers.

JVMObject CreationThread Local Allocation Buffer
0 likes · 7 min read
How Java Objects Are Created and Managed in the JVM
Tech Musings
Tech Musings
Mar 27, 2020 · Fundamentals

How Virtual Functions Expand C++ Class Size and Shape Memory Layout

This article explains how C++ compilers implement virtual functions using a hidden vptr and virtual table, showing how class size grows from 1 to 8 bytes, detailing memory layouts for single, multiple, and diamond inheritance, and providing commands to dump vtable and layout information.

CInheritanceVTable
0 likes · 14 min read
How Virtual Functions Expand C++ Class Size and Shape Memory Layout
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
Sohu Tech Products
Sohu Tech Products
Jul 17, 2019 · Mobile Development

Understanding Swift Object Creation, Method Dispatch, and Memory Layout – A C‑Style Pseudocode Exploration

This article explains how Swift objects are created and destroyed, how method calls are implemented compared with Objective‑C, the memory layout of Swift classes, the role of virtual tables, the impact of compiler optimizations, and the feasibility of runtime method replacement, illustrated with extensive C‑style pseudocode examples.

Compiler OptimizationMethod DispatchRuntime
0 likes · 34 min read
Understanding Swift Object Creation, Method Dispatch, and Memory Layout – A C‑Style Pseudocode Exploration
Qunar Tech Salon
Qunar Tech Salon
Apr 9, 2019 · Fundamentals

Understanding Java Object Memory Layout and the Oop‑Klass Model

This article explains the JVM Oop‑Klass model, details how Java objects are represented in heap memory, shows how to calculate their size using source code analysis, HSDB, Instrumentation, Unsafe, and third‑party tools, and provides practical examples and code snippets.

HSDBJVMJava
0 likes · 15 min read
Understanding Java Object Memory Layout and the Oop‑Klass Model
MaGe Linux Operations
MaGe Linux Operations
Mar 1, 2019 · Fundamentals

Understanding Linux Process Management: From Fork to Scheduling

This article explains Linux process management fundamentals, covering process concepts, lifecycle, threads, priorities, context switches, interrupt handling, process states, memory layout, and the O(1) CPU scheduler, providing clear diagrams and practical insights for developers and system engineers.

LinuxOperating SystemScheduling
0 likes · 14 min read
Understanding Linux Process Management: From Fork to Scheduling
JD Tech
JD Tech
Aug 16, 2018 · Mobile Development

Deep Dive into Objective‑C Object Memory Layout and Runtime Structures

This article explores the low‑level implementation of Objective‑C objects by examining instance memory allocation, the differences between class_getInstanceSize and malloc_size, the internal structures of instance, class, and meta‑class objects, and how isa and superclass pointers link them together.

Objective‑CRuntimeclass object
0 likes · 16 min read
Deep Dive into Objective‑C Object Memory Layout and Runtime Structures
ITPUB
ITPUB
Aug 3, 2016 · Fundamentals

Why Do Linux Segmentation Faults Occur? ELF Layout, Memory Mapping & Debugging

This article explains how Linux programs are loaded, the distinction between ELF sections and segments, virtual‑to‑physical address translation, the role of the MMU, brk/sbrk usage, address‑space layout, and practical steps to reproduce and avoid segmentation faults.

ELFLinuxmemory layout
0 likes · 15 min read
Why Do Linux Segmentation Faults Occur? ELF Layout, Memory Mapping & Debugging