Tag

Object Layout

1 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
Ops Development Stories
Ops Development Stories
Mar 28, 2022 · Fundamentals

How Java Creates Objects: From Memory Allocation to Object Layout

This article explains the complete lifecycle of Java object creation, covering the JVM's handling of the new bytecode, class loading, memory allocation strategies such as pointer bumping and free lists, object header structure, layout, and tools for inspecting object memory.

Garbage CollectionJVMMemory Allocation
0 likes · 13 min read
How Java Creates Objects: From Memory Allocation to Object Layout
Sanyou's Java Diary
Sanyou's Java Diary
Feb 15, 2022 · Fundamentals

Understanding Java Memory Areas and Object Layout: A Deep Dive

Explore the structure of Java's memory regions—including the program counter, stacks, heap, and method area—along with allocation algorithms, object layout, garbage collection roots, and common pitfalls such as memory leaks and StackOverflowError, providing a comprehensive guide for JVM developers.

Garbage CollectionJVMMemory Management
0 likes · 16 min read
Understanding Java Memory Areas and Object Layout: A Deep Dive
Code Ape Tech Column
Code Ape Tech Column
Sep 1, 2021 · Fundamentals

Understanding Java Object Memory Layout with JOL

This article explains how Java objects are stored in memory, covering the object header, instance data, alignment padding, lock states, pointer compression, and field reordering, and demonstrates how to inspect these structures using the OpenJDK JOL tool with practical code examples.

JOLJVMMark Word
0 likes · 20 min read
Understanding Java Object Memory Layout with JOL
macrozheng
macrozheng
Apr 26, 2021 · Backend Development

How Much Memory Does a Java Object Really Use?

Understanding the actual memory footprint of Java objects—including headers, class pointers, fields, and alignment—reveals hidden waste, and the article provides calculations for Integer objects, arrays, and collections, plus practical guidelines to reduce memory usage by preferring primitive types, smaller fields, and arrays over collections.

Backend DevelopmentMemory ManagementObject Layout
0 likes · 9 min read
How Much Memory Does a Java Object Really Use?