Tag

memory layout

0 views collected around this technical thread.

Deepin Linux
Deepin Linux
May 11, 2025 · Fundamentals

Understanding C++ Virtual Function Tables (vtable) and Their Memory Layout

This article explains how C++ implements runtime polymorphism through virtual function tables, detailing their structure, memory placement, how they enable dynamic binding, and illustrating usage with single, multiple inheritance and practical code examples.

C++inheritancememory layout
0 likes · 17 min read
Understanding C++ Virtual Function Tables (vtable) and Their Memory Layout
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.

Goempty interfaceinterface{}
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.

C languagearray indexingmemory layout
0 likes · 8 min read
Why Array Indices Start at Zero: History, Memory Layout, and Practical Benefits
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.

LoadingOperating Systemelf
0 likes · 5 min read
Understanding How Executable Programs Run and Their Memory Layout
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.

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

CompilationDynamic LinkingLibraries
0 likes · 9 min read
Understanding the Difference Between Static and Dynamic Libraries
IT Services Circle
IT Services Circle
Feb 9, 2023 · Fundamentals

Understanding C++ Polymorphism: Vtable Layout, Multiple Inheritance, and Thunks

This article explains how C++ implements runtime polymorphism through virtual function tables, analyzes the memory layout of single‑ and multiple‑inheritance classes using gcc and gdb, and clarifies the role of thunks and offset adjustments for correct virtual calls.

C++GDBMultiple Inheritance
0 likes · 20 min read
Understanding C++ Polymorphism: Vtable Layout, Multiple Inheritance, and Thunks
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.

C++InternalsPHP
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.

Garbage CollectionJVMJava
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.

JVMJavaObject Creation
0 likes · 7 min read
How Java Objects Are Created and Managed in the JVM
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 DispatchObject Model
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.

HSDBInstrumentationJVM
0 likes · 15 min read
Understanding Java Object Memory Layout and the Oop‑Klass Model
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